Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 07-31-2007, 05:17 AM javascript onclick
Novice Talker

Posts: 6
Trades: 0
Hello

I have a form in which i want to call 3 functions when the button is pressed...
if one returns false i want all the functions to quit and display the error generated by the false returning function.

Will all the functions i call return false if one returns false how do i do this?
In short i dont want the form to continue if one function returns false..

Could someone share the code how it will be:
<button type="button" name="B2"
onclick="URLform.target='_parent';URLform.submit() ">
Accept Terms</button>

How will i do the returning false and true part?
uniaxaj is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-31-2007, 09:44 AM Re: javascript onclick
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
onclick="return functionYouWantReturned();"

And then in your Javascript, something like this:
Code:
function functionYouWantReturned() {
     function1();
     function2();
     function3();
     if (some condition you define) {
           URLform.submit();
     }
}
This will get you started...the rest you'll have to figure out by yourself, since it depends on what you're doing.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)

Last edited by ADAM Web Design; 07-31-2007 at 09:46 AM..
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 08-14-2007, 02:29 PM Re: javascript onclick
Novice Talker

Posts: 6
Trades: 0
http://www.webmaster-talk.com/javasc...gh-iframe.html



someone pls help me reg.this post.
uniaxaj is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to javascript onclick
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23746 seconds with 12 queries