Uwe,

If you formally submit a form, it's going to load the action page. If
you want to take those form values and do something with them first,
create a function that plays with the values, then submits the form via
'document.formName.submit();'.

If you use type="submit" the onClick will execute first then the page
will be submitted. So you wouldn't want to use it to run a validation
function, because regardless of what it returns, it will still submit.

Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division


-----Original Message-----
From: Uwe Degenhardt [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 20, 2002 9:32 AM
To: CF-Talk
Subject: OT: JS - submit/button problem

Hi list,
at the end of a form I have:
<INPUT TYPE="submit" VALUE="SUBMIT" onclick="something(this.form)">
but I need a
<INPUT TYPE="button" VALUE="SUBMIT" onclick="something(this.form)">
to let a JS-routine run, which is further up.

But I want to pass values to a action script.
So is there a way to only let the form submit parameters
if the onclick-routine is passed  ?

Thanks for ideas.

Uwe


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to