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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Javascript form + -
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 25 June 2001 :  06:08:41  Show Profile  Send RaiderUK a Yahoo! Message
hi,

I have a form on a page which contains a text baox and by the side a picture with a + and - symbol. When pressed it increases or decreases the value of the text box, but what is happening it that when you press the buttons the page goes blank with just the value inside then if you press back it goes back but with the new value.

Can anyone help please.
here is the code:



RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 25 June 2001 :  06:10:28  Show Profile  Send RaiderUK a Yahoo! Message
sorry forgot the code.
Here it is:

<input type="text" name="quantity" size="3" value="1">

<img src="images/add_sub.gif" width="10" height="22" usemap="#Map" border="0">

<area shape="rect" coords="1,11,10,20" href="Javascript:" --frm_add.quantity.value;"">
<area shape="rect" coords="0,1,10,8" href="Javascript:++frm_add.quantity.value">

Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 25 June 2001 :  12:31:29  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
Well, thats because using a "href=" tells the browser to request a new page. I haven't ever worked with the area tag, but my first attempt would be change "href=" to "onClick=". When you do that, you can take out the Javascript:

Give it a shot, it might not work, but I think it will.

-Dan

Go to Top of Page

Dan Martin
Average Member

USA
528 Posts

Posted - 25 June 2001 :  18:04:56  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
One more thing. This may be a result of how Snitz showed it, but your quote structure doesn't look like it would work.
quote:

<area shape="rect" coords="1,11,10,20" href="Javascript:" --frm_add.quantity.value;"">



Go to Top of Page

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 25 June 2001 :  19:24:10  Show Profile  Send RaiderUK a Yahoo! Message
thanks alot Dan, wroking well now

the extra "'s were just me trying different things.

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