Jump to content

plus minus form input box


chiprivers

Recommended Posts

Can any one help me with a script that will increase or decrease the value in a form input box each time either a plus or minus charachter is clicked on?

 

Much like what you would have in a shopping cart, a form input box with say a number 1 default in it, you will have a + and - charaters next to the box and if you click on the + the number in the box will increment 1 and if you click on - it will decrement 1.

 

I want this all to work without reloading the page!

Link to comment
Share on other sites

Wouldn't it be easier to have a drop-down selection box instead?

 

If you want the value to update AS the user is clicking then you're going to need to use Javascript otherwise it's a case of the page refreshing every time they click a button.

Link to comment
Share on other sites

A drop down box is one option but for the styling of the page I would prefer the prementioned design. I think it gives it a slightly more professional image and slightly easier functionality for the user.

 

I think javascript is probably going to be the way forward, any javascript experts?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.