Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2005, 02:59 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
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
Reply With Quote
  #2 (permalink)  
Old May 17th, 2005, 04:13 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
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
Reply With Quote
  #3 (permalink)  
Old May 17th, 2005, 05:22 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
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?

Reply With Quote
  #4 (permalink)  
Old May 17th, 2005, 06:04 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
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
Reply With Quote
  #5 (permalink)  
Old May 17th, 2005, 06:05 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.