What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Dynamically changing text box, based on a form input?

Dynamically changing text box, based on a form input?
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. Dynamically changing text box, based on a form input?
Hey,

How would I be able to retrieve the amount entered into a form, eg. $5.00, and then divide that number by 0.05, and the finally rounding it to the nearest whole number, and display the result?


Maybe this will help:

This is the form I am trying to get the amount from.
HTML code:
<form name="MyForm" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <fieldset>
    <label for="amount">$</label>
    <input id="amount" name="amount" value="5.00" />
    <label for="custom">Steam ID:</label>
    <input id="custom" name="custom" value="<?php echo strstr(curPageURL(), 'STEAM_');?>" />
    <input name="business" type="hidden" value="******************" />
    <input name="cmd" type="hidden" value="_xclick" />
    <input name="currency_code" type="hidden" value="USD" />
    <input name="item_name" type="hidden" value="vip" />
    <input name="no_note" type="hidden" value="1" />
    <input name="no_shipping" type="hidden" value="1" />
    <input src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" type="image" alt="Click here to donate">
   
  </fieldset>
</form>

I am trying to get the amount entered by the user, which as you can see above, defaults to $5.

Many thanks.
02-07-2010 09:37 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Dynamically changing text box, based on a form input? - by Jimbo on 02-07-2010 at 09:37 PM
RE: Dynamically changing text box, based on a form input? - by Chrissy on 02-07-2010 at 10:07 PM
RE: Dynamically changing text box, based on a form input? - by stoshrocket on 02-07-2010 at 10:14 PM
RE: Dynamically changing text box, based on a form input? - by Jimbo on 02-07-2010 at 11:03 PM
RE: Dynamically changing text box, based on a form input? - by Spunky on 02-07-2010 at 11:44 PM
RE: Dynamically changing text box, based on a form input? - by Jimbo on 02-08-2010 at 12:15 AM
RE: Dynamically changing text box, based on a form input? - by Spunky on 02-08-2010 at 12:22 AM
RE: Dynamically changing text box, based on a form input? - by stoshrocket on 02-08-2010 at 12:36 AM
RE: Dynamically changing text box, based on a form input? - by Jimbo on 02-08-2010 at 12:37 AM
RE: Dynamically changing text box, based on a form input? - by Spunky on 02-08-2010 at 12:40 AM
RE: Dynamically changing text box, based on a form input? - by Jimbo on 02-08-2010 at 01:08 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On