Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

onClick in netscape

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am having problem with this in netscape.This does not work.I have tried using href also then,Netscape hung.When onclick it has to open another window and replaces that with Configure .jsp.But this does not work in netscape
<input type="image" alt="Configure" border="0" src="/tndportal/images/button_configure.gif"
onClick="javascript:openForCSP('configure');"/>
I tried using this

<a href="#" onClick="this.href=javascript:openForCSP('configure');">
<img src="/tndportal/images/button_configure.gif" border="0" alt="Configure"/></a>
this works in IE but not in netscape.Can anyone help with a work around
Thanks,
Anitha
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try onMouseDown instead of onCLick
sometimes that works
[This message has been edited by Randall Twede (edited August 03, 2001).]
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Input type image and anchors don't manage onClick event.
The input type image is like a submit button, therefore if you want to call a javascript function, do it in the action prperty of the form or in the onSubmit event of the form.
you can call a javascript function in an anchor by calling it in the href property, like that:
<a href="javascript:openForCSP('configure');">
 
Anitha Thomas
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by xavier romea:
Input type image and anchors don't manage onClick event.
The input type image is like a submit button, therefore if you want to call a javascript function, do it in the action prperty of the form or in the onSubmit event of the form.
you can call a javascript function in an anchor by calling it in the href property, like that:
<a href="javascript penForCSP('configure');">


Hi ,
I have already tried all this possibilities but nothing works in netscape,it wont evalute the cmd =configure and open the configure.jsp,instead netscape is evaluating the cmd =run and open the same window again.In IE it will open a new window and evalute the cmd=configure and open the Configure.jsp.With the form i canot give action or onSubmit event because there are three more input type images which calls three other jsps according to the image clicked, and each time different CMDs are evaluated, is also included in the xsl.
Thanks,
Anitha
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would try this:
<a href="javascript:openForCSP('configure');">
<img src="/tndportal/images/button_configure.gif" border="0" alt="Configure"/></a>
And if that doesn't work, I would think that the problem is in your function and not in how you are calling it. IE is sometimes too forgiving so you have to be sure your syntax is letter perfect.
[This message has been edited by Connie Boyd (edited August 06, 2001).]
[This message has been edited by Connie Boyd (edited August 06, 2001).]
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic