Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Multiple Functions
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jrbp
New Member

USA
63 Posts

Posted - 13 September 2003 :  10:43:49  Show Profile  Visit jrbp's Homepage  Send jrbp an AOL message
Is it possible to have multiple functions in event handelers i.e
<input type=submit onclick="function1(); function2(); function3"> ?

Thanks, Josh

Josh Roy


Midtown Madness 2 Department of Motor Vehicals
My Forum

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 13 September 2003 :  11:38:13  Show Profile
yes.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 September 2003 :  12:23:01  Show Profile  Visit dayve's Homepage
a better way would be to create one function and execute the others within... You also do not want to try and execute a function with a submit button the way you have... include the submission in part of the function or do an onSubmit in the <form> tag.

<script>
Function doFunctions() {
function1();
function2();
function3();
return true; // submits form
}
</script>

<form onSubmit="doFunctions();"
<input type="Submit">
</form>

Go to Top of Page

jrbp
New Member

USA
63 Posts

Posted - 13 September 2003 :  12:54:51  Show Profile  Visit jrbp's Homepage  Send jrbp an AOL message
ok,
This message goes with the other message i posted (javascript popup creator) because I was thinking maybe i could do this:

<textarea><a href="<script language="javascript">
Function one(){
document.write(document.form.url.value)
}
</script>" onclick="NewWin=window.open('<script language="javascript">
Function two(){
document.write(document.form.url.value)
}
</script>', .....</textarea>

<input type=submit onclick="one(); two(); ...">

Would that work?

Thanks, Josh

Josh Roy


Midtown Madness 2 Department of Motor Vehicals
My Forum
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 September 2003 :  13:04:31  Show Profile  Visit dayve's Homepage
no, the script in the textarea will not be treated as a function, it will only be recognized as text.

Go to Top of Page

jrbp
New Member

USA
63 Posts

Posted - 13 September 2003 :  13:20:02  Show Profile  Visit jrbp's Homepage  Send jrbp an AOL message
any good ideas of doing this then. Ive been tying to figue this out for weeks and ive asked about 20 people but all ive been getting is little bits and pieces that people find thats wrong with my page: Jr.marlintinicharters.com/popup.html
Although i am very greatfull to those people that have given my small answers i am getting frustrated with this.
Thank you, Josh

Josh Roy


Midtown Madness 2 Department of Motor Vehicals
My Forum
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 September 2003 :  13:21:23  Show Profile  Visit dayve's Homepage
why are you putting the script in the textarea in the first place? I don't understand what it is you're trying to accomplish.

Go to Top of Page

jrbp
New Member

USA
63 Posts

Posted - 13 September 2003 :  13:48:22  Show Profile  Visit jrbp's Homepage  Send jrbp an AOL message
the whole main problem is in the topic titled "javascript popup creator" This was another question i had about getting it to work

Josh Roy


Midtown Madness 2 Department of Motor Vehicals
My Forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07