Author |
Topic |
|
RaiderUK
Average Member
United Kingdom
577 Posts |
Posted - 25 June 2001 : 06:08:41
|
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
|
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">
|
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 25 June 2001 : 12:31:29
|
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
|
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 25 June 2001 : 18:04:56
|
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;"">
|
|
|
RaiderUK
Average Member
United Kingdom
577 Posts |
Posted - 25 June 2001 : 19:24:10
|
thanks alot Dan, wroking well now
the extra "'s were just me trying different things.
|
|
|
|
Topic |
|