List Info

Thread: Re: Triggering a clicked event




Re: Triggering a clicked event
country flaguser name
United States
2007-07-28 00:19:09
Please explain better what you want to do. I probably can
help you but
I don't know if i understood well.
--Roger

On Jun 28, 12:23 pm, lulu <crow4...comcast.net> wrote:
> I have a simple hyperlink ( <a> tag ) that I
would like to simulate a
> user click from a JS function.
>
> Is there a JS function that will do this?  My simple
test code is as
> follows:
>
> <script type="text/javascript">
>         function tryclick()
>         {
>
>         alert('test');
>
>          var
e=document.getElementsByName("nm");
>          for(var i=0;i<e.length;i++){
>                                 e[i].click();
>         }
>
>         }
> </script>
>
> </head>
>
> <body id="content" >
>         <b id="b" name="lisa"
class="p" >test</b>
>         <a href="notyetlive.php"
id="testlink" name="nm"
class="p" > click
> here </a>
>         <input type="button"
onclick="tryclick()" value="tryclick"
> id="button" class="p" />
>
> </body>
> </html>
>
> Any help is appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )