Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2005, 02:59 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default Effect of changing option value

I've many OPTION values in a SELECT element, I want, that when a user changes SELECT value, this value is assigned to some var. I've no SUBMIT button on that FORM.


__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old May 17th, 2005, 04:13 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You can use onchange event of "<select>" to call a javascript function which will assign this value to a javascript variable.

Om Prakash
 
Old May 17th, 2005, 05:22 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

And I need to refresh the page and use POST method, not querystring. Can JavaScript, still submit the FORM onchange, and POST variables are available to me?

 
Old May 17th, 2005, 06:04 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You can submit the page when the options are changes.

Can JavaScript, still submit the FORM onchange, and POST variables are available to me?

YES - when the form is submitted by onchange, you will get tha post variables.

Om Prakash
 
Old May 17th, 2005, 06:05 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You can submit the page when the options are changed.

Can JavaScript, still submit the FORM onchange, and POST variables are available to me?

YES - when the form is submitted by onchange, you will get tha post variables.

Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Check Boxes/Option buttons/Option Group hewstone999 Access VBA 1 March 14th, 2008 07:25 AM
Hover effect in Internet Explorer Cyber Shiva HTML Code Clinic 2 August 27th, 2007 12:02 PM
hi xml toggle effect gauravkg XSLT 1 September 8th, 2006 09:04 AM
this.onmouseover hyperlink textchange effect interrupt Javascript How-To 1 February 17th, 2005 10:34 AM
how to create film strip effect... elladi Flash (all versions) 2 January 5th, 2005 11:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.