You are not logged in.
Hello, there. I suck at JavaScript and haven't grasped it yet...Here's my question:
I have a form with a textbox called "text_qty", a select called "select_color" and a submit button called "button_submit". I want to, onclick of the submit button, make it forward to a URL comprised of the values in the select and the textbox, like so:
http://www.mydomain.com/car.php?qty=[text_qty]&color=[select_color]
How could I do this? Or is there a good, newbie-oriented website that deals with this type of JavaScript issue?
ANy help would be greatly appreciated. Thanks.
Offline
I want to, onclick of the submit button, make it forward to a URL comprised of the values in the select and the textbox, like so:
http://www.mydomain.com/car.php?qty=[text_qty]&color=[select_color]
I guess you are looking for method="get" instead of method="post" in the form element? Post sends form values in http header (not visible in browser) and get sends it as url.
How could I do this? Or is there a good, newbie-oriented website that deals with this type of JavaScript issue?
You are kidding right ? :-)
http://www.google.com/search?hl=en&ie=U … method+get
Offline
No, I was not kidding.
Thanks for the "get" tip, though. I'm a newbie.
*hangs head in shame*
Offline
I got it working. Oddly enough, my HTML knowledge is apparently still wanting, because I realize now that I could do all this with only the "get" method, as you posted. Very easy. Duh!
Thanks again!
Offline
I got it working. Oddly enough, my HTML knowledge is apparently still wanting, because I realize now that I could do all this with only the "get" method, as you posted. Very easy. Duh!
Thanks again!
I will give you this piece of advice -
make sure you learn xhtml and css, before you start fooling around with javascript or things like it.
when you know xhtml and css, you can have some look at php and databases, and after that... ^_^
(I'm still in learning xhtml and css, and have begun looking at php)
javascript isn't that very usefuly, except for some minor functions...
To err is human... to really foul up requires the root password.
Offline
Well, I guess I actually know more than I let on...I currently work creating DB-driven sites using MS-SQL and ASP. I know XHTML and CSS fairly completely, but never took the time to figure out what the difference was between "get" and "post".
As for JavaScript...it's necessary, IMHO. What would you do the client-side stuff with if not in JavaScript??? But I'm just starting on it.
AND, I'd like to learn more PostgreSQL and Python/PHP to be a bit freer, but oh, well.
Offline
Well, I guess I actually know more than I let on...I currently work creating DB-driven sites using MS-SQL and ASP.
That's more or less what I'm doing in my primary work (and some other projects too) :-)
Offline