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
 Code Support: ASP (Non-Forum Related)
 Javascript help, add subtract submit
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 21 June 2001 :  05:53:58  Show Profile  Send RaiderUK a Yahoo! Message
Can some one help me with a bit of javascript to add or take a number from a text box then submit the form.
ie. there is a text box at the side are 2 buttons one with a arrow pointing up and the other down, the value of the text box is say 5, if you press up arrow it is moved to 6 and the form is submitted and the down arrow will move a number down and the form will be sumbitted.

Thanks,

Dan Martin
Average Member

USA
528 Posts

Posted - 21 June 2001 :  11:28:31  Show Profile  Visit Dan Martin's Homepage  Send Dan Martin an AOL message  Send Dan Martin an ICQ Message  Send Dan Martin a Yahoo! Message
This is how I would do it.

<form name=myForm action=testJS.html method=get>
<input type=button value="/\" onClick="++myForm.myVal.value;myForm.submit()">
<input type=text name="myVal" value=0>
<BR>
<input type=button value="\/" onClick="--myForm.myVal.value;myForm.submit()">
</form>


-Dan

Edited by - Dan Martin on 21 June 2001 15:39:59
Go to Top of Page

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 21 June 2001 :  18:45:48  Show Profile  Send RaiderUK a Yahoo! Message
thanks alot, was just what i was after.

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.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07