Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using image input type with javascript? 1

Status
Not open for further replies.

lyn

Programmer
Oct 22, 1998
2
0
0
US
I am using an input form type of "IMAGE" so that I can use images as<br>
buttons. I have placed the onClick specification in the code and it<br>
works just fine. The problem I am running into is that the HREF tag<br>
must be specified which then loads/re-loads the frame with the <br>
specified html file. How can I use the IMAGE without re-loading the<br>
frame each time the button is pressed? What seems to happen is that <br>
the variables, windows defined etc. become undefined when the page<br>
is reloaded.<br>
<br>
Thanks in advance
 
I found my answer so don't bother to reply. Place an # in the HREF<br>
tag.<br>
<br>
&lt;.... HREF="#" .....&gt; keeps the current page loaded.
 
Thanks for coming back with the answer for that. I was having the same trouble...:)<br>
<br>
Doug
 
Not to bother you, but another possibility....more universal in it's usefulness is the JavaScriptlet: return false;<br>
This will keep forms from submitting, pages from re-loading, references from being followed, status bar messages from being displayed, etc. Really a useful little line!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top