Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Help with Appending to Form


Fotiman - 5:24 pm on May 15, 2012 (gmt 0)


Welcome to WebmasterWorld!
You don't need JavaScript for this, and in fact, you should NOT use JavaScript for this or your forms will be broken for people that have JavaScript disabled. Instead, change your form action to be the url, then change the form input element names to match the values you're looking for (pid and qty):


<form action="http://www.example.com/shop/cmd.php">
<select name="pid">...</select>
<input name="qty" value="1" size="2" maxlength="3" />
<input type="image" ... />
</form>


If you are not transmitting any sensitive data, and you're not actually changing anything on the server yet, then you can make the method="get" (which will pass the values in the querystring). Alternatively, leave it as method="post" and modify your cmd.php to process the POST data instead of GET.

Hope that helps.

[edited by: incrediBILL at 6:03 pm (utc) on May 15, 2012]
[edit reason] fixed URLS, use Example.com [/edit]


Thread source:: http://www.webmasterworld.com/html/4453786.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com