Jump to content

dfin

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by dfin

  1. ahhh.. thanks so much. I'm quite rusty and just getting back into this. i had some id's stuck here and there and didn't put em back with other trial and error's. i have it now also submitting to the value of another input field also.
  2. I have a form where I need the text value to be passed to another form element later on. Right now, it have <form method='post' action='https://secure.autho...ay/transact.dll' > <input type='text' name='amount' value='50.00' /> Change: <input type="checkbox" name="chg" onclick="myF(this.form)"> <script type="text/javascript"> function myF(val) { var num = val; var n = num.toString(); alert("You have now changed the amount to pay: " + n ); } </script> <input type='text' name='x_amount' value='<?php echo $_REQUEST['num'] ?>' /> <input type='Submit' value='Pay Now'> </form> It will then return the Alert box & in place of + n, it says object HtmlFormElement. I tried doing a document.getElementById(this.form), but I think that gave me a null. I know I will later need to do a validation to make sure it is a number & 2 decimals, but for now I need my alert & variable to be passed right. I've tried + n, + val, had it to where it didn't create the toString...nothing works
×
×
  • 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.