View Full Version : help with javascript-arrows for increase/decrease

07-23-2011, 03:26 PM
Hi I'm completely stuck, I am looking for placing small
up and down arrows next to my textbox. They would work with by increasing/decreasing number of products. The text box would be active so a client could put the number of a product himself/herself or simply by clicking the up/down arrows next to the text box.

I am not sure how to look for it, I mean I thought something like that should exist by default, I search w3c and I can find only combo box etc.
Could someone put me on the right track please?..

07-23-2011, 04:36 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<script type="text/javascript">

function Add(id,ud){
var obj=document.getElementById(id);

<form >
<input name="number" id="number" />
<img alt="Up" class="butV" id="up" src="http://www.vicsjavascripts.org.uk/StdImages/Up1.gif" onmouseup="Add('number',1);" />
<img alt="Down" class="butV" id="down" src="http://www.vicsjavascripts.org.uk/StdImages/Down1.gif" onmouseup="Add('number',-1);" />