dcsimg
Javascript function like onClick on link.click()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Neha_Verma
Posted On:   Friday, June 3, 2005 03:43 AM

Hi I have a JSP page with links of the format, a href=# myurl=" " onClick="myfunc()" Now when I click on the link, the javascript function is responsible to change the href value to the value of myurl. In my Code I have done the following, ------------ WebLink link=respTaskPage.getLinkWithImageText("Save for later"); link.click(); ------------- Somehow the javascript function, onclick is not being called and there the page does not refresh to the correct url. Any pointers on why this cud b happening? I have included the javascript jar also.    More>>

Hi
I have a JSP page with links of the format,
a href=# myurl=" " onClick="myfunc()"

Now when I click on the link, the javascript function is responsible to change the href value to the value of myurl.

In my Code I have done the following,
------------
WebLink link=respTaskPage.getLinkWithImageText("Save for later");
link.click();
-------------

Somehow the javascript function, onclick is not being called and there the page does not refresh to the correct url.

Any pointers on why this cud b happening? I have included the javascript jar also.

   <<Less

Re: Javascript function like onClick on link.click()

Posted By:   Anonymous  
Posted On:   Friday, June 3, 2005 06:38 AM

1) wrong forum

2) add a semicolon after myfunc()
About | Sitemap | Contact