You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sh...@wipro.com on 2007/07/06 07:02:36 UTC

How to call a java script method when the form is loading...

Hi,

                How to call a java script method when the page is
loading using <h:form>.

Actually we have onLoad event for <body> tag in html. I tried this event
for <h:form>. But its not working.

Can anybody tell me how to call a java script method when my form is
loading?

 

Regards,

Basha

 




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: How to call a java script method when the form is loading...

Posted by Vladimir Isakovich <iv...@gmail.com>.
First you should read about javaScript. Just google and find a sutable link.
onLoad event may be accessed from <body > tag only.
Actually, there are two ways to call js function on load.
1. - the most legit - usin onLoad event as you tried but from a wrong tag
2. - just call your function from the open script between <script> tags -
this way there is no garantee if your page has already being loaded, you may
even experiment placing this call before and after the /body or even after
the </html> - this is not recomended if you're going to refer to some
element of your document - there is always a question if it has beeen
rendered at the time.

vlad

On 7/6/07, shaikyesdani.basha@wipro.com <sh...@wipro.com>
wrote:
>
>  Hi,
>
>                 How to call a java script method when the page is loading
> using <h:form>.
>
> Actually we have onLoad event for <body> tag in html. I tried this event
> for <h:form>. But its not working.
>
> Can anybody tell me how to call a java script method when my form is
> loading?
>
>
>
> Regards,
>
> Basha
>
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>