help with javascript and forms

Reply

Join Date: Jun 2005
Posts: 9
Reputation: symoore22 is an unknown quantity at this point 
Solved Threads: 0
symoore22 symoore22 is offline Offline
Newbie Poster

help with javascript and forms

 
0
  #1
Jun 22nd, 2005
hi

i am trying to turn this code:

strOutput += "<input type=hidden name=\"amount\" value=\""+ moneyFormat((fTotal + fShipping + fTax)) + "\">";

into a html form line:
<input type=hidden name="amount" value="??????????">

im not sure what i shud be putting in the value bit.

can anybody help

thanks

simon
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: help with javascript and forms

 
0
  #2
Jun 22nd, 2005
This is the PHP forum. Please post this in the DHTML/Javascript forum. Or Forum Moderator, please move this post.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 26
Reputation: darklordsatan is an unknown quantity at this point 
Solved Threads: 1
darklordsatan's Avatar
darklordsatan darklordsatan is offline Offline
Light Poster

Re: help with javascript and forms

 
0
  #3
Jun 24th, 2005
Taken from W3Schools

For buttons, reset buttons and submit buttons: Defines the text on the button.

For image buttons: Defines the symbolic result of the field passed to a script.

For checkboxes and radio buttons: Defines the result of the input element when clicked. The result is sent to the form's action URL.

For hidden, password, and text fields: Defines the default value of the element.

Note: Cannot be used with type="file"

Note: This attribute is required with type="checkbox" and type="radio"
Basically, the value field is only needed in 2 cases:
1. You wanna put a "default" value for a textfield
2. You are going to pass some default values to an script (ASP,PHP) defined in the form's action attribute

If you're just playing around with javascript, then likely you wont need it for now, I hope thats clear to you

cheers
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC