How to programmatically click on a EIT Lightbox hyperling in asp.net

Posted by CruelIO on Stack Overflow See other posts from Stack Overflow or by CruelIO
Published on 2010-03-28T21:15:51Z Indexed on 2010/03/28 21:23 UTC
Read the original article Hit count: 196

Filed under:
|
|

Hi

On my webpage Im using EIT Lightbox to display images. I need to click on the Lightbox hyper link by code. I have tried the following

body.Attributes.Add("onLoad", "document.getElementById(\"lbh1\").click()\n");
body.Attributes.Add("onload", "eval(document.getElementById(\"lbh1\").href);\n");

But neither seems to work. If I use the following code

body.Attributes.Add("onload", "alert('popup');\n");

The alert is displayed

Is there another way to do the click?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript