Click to See Complete Forum and Search --> : Dynamically click link in Netscape using click() - not working!!


hay7777
04-09-2003, 05:57 PM
Hi.

I'm trying to convert my code from IE to NN - both at 6 or above.

I have some DHTML which clicks a link when a page loads to display the contents below...the problem is that this doesn't seem to work with Netscape.

Code is: document.getElementById("catLink1").click();

Can anybody help?

Cheers!

David

gil davis
04-10-2003, 05:45 AM
It pretty much depends on what kind of object "catLink1" is. It would help to see the HTML that creates "catLink1".

hay7777
04-10-2003, 10:28 AM
Yep, figured that Netscape didn't support it, Dave. Thanks for suggestion - the link's target is another frame, but I guess I can grab it's href and set it.

Gil, the link is create on the fly - the generated code is:

innerHTMLStr = "<a id='catLink1' href='/Kiosk/dtShowFormsList.do?catId=1' target='formselectionlistframe' onclick='setCatSelected(7)'>catName</a>";

Any other ideas?

Cheers,

David

hay7777
04-11-2003, 02:06 PM
Thanks! That's exactly what I'd done!! ;-)

David