faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

25 of 50 people (50%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

can you use the onclick handler on netscape for multiple image submit buttons for a form using onclick="this.form.action='asppage.asp'?

Apr 4th, 2008 21:15
ha mo, Colin Fraser, Chet Lad,


No. What you are trying to do is improper coding, in any language I have
ever used. 
Try
<script>
function activity(){
     this.form.action='asppage.asp'
}
</script>
<form>
<input type=button value="click me" onclick="activity()"></form> 
This is basic script stucturing, it is always better to place actions
into a function. Even if it is some simple thing that is used only once
in a site, under a strict condition. This makes error detection a lot
easier than using any other technique, for what works on your computer
may not work on another.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com