•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,541 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1197 | Replies: 2
![]() |
•
•
Join Date: Jun 2005
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
•
•
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation:
Rep Power: 4
Solved Threads: 4
This is the PHP forum. Please post this in the DHTML/Javascript forum. Or Forum Moderator, please move this post.
Taken from W3Schools
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
•
•
•
•
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- How to set the focus on a text box..? (C#)
- Newbie php question. how to create a mailing list? (MySQL)
- If you could change one thing ... (DaniWeb Community Feedback)
- Need help with php mailing list/redirect (PHP)
- having problem with some chars to display (JavaScript / DHTML / AJAX)
- Resizing text fields (JavaScript / DHTML / AJAX)
- making my first form in dreamweaver (Site Layout and Usability)
- HYPERLINK with PHP POST (PHP)
- Does google understand javascript? (Search Engine Optimization)
Other Threads in the PHP Forum
- Previous Thread: Problems in Dynaform (Form Mail) URGENT HELP
- Next Thread: PHP Programmer needed (CMS)


Linear Mode