Irish SEO,  Marketing & Webmaster Discussion

 
play.com free delivery

'Select Box' Selection Function

This is a discussion on 'Select Box' Selection Function within the Coding Help forums, part of the Webmaster Help category; Ok, i have two select boxes called make and model, i want the user to select an option from the ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack (3) Thread Tools Display Modes
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-11-2007, 08:39 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default 'Select Box' Selection Function

Ok, i have two select boxes called make and model, i want the user to select an option from the make box and depending on what the user selects the model box will be filled with results from an SQL query, i think its to do with Javascript but i m not too up the JS myself, can anyone help?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-11-2007, 08:51 PM
paul's Avatar
ninja SEO
Recent Blog: That SEO contest
 
Join Date: Dec 2006
Location: .de
Posts: 1,120
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

something like ... JavaScript Toolbox - Dynamic Option List ?
__________________
my sites :
irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-11-2007, 09:11 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default

Thats exactly it, only problem is, the way its done here means i have to have every record in js on the page, theres so many makes and models it would be efficent to have it this way, is there any other way to do it(keep in mind all the makes and models are in a DB)?

Code:
var regionState = new DynamicOptionList();
regionState.forValue("west").addOptions("California","Washington","Oregon");
regionState.forValue("midwest").addOptions("Illinois","Iowa","Missouri");
regionState.forValue("east").addOptions("New York","Maine","Pennsylvania");

Last edited by ziycon; 12-11-2007 at 09:26 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 12-11-2007, 09:37 PM
paul's Avatar
ninja SEO
Recent Blog: That SEO contest
 
Join Date: Dec 2006
Location: .de
Posts: 1,120
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
paul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud ofpaul has much to be proud of
Default

You could do something nice with AJAX.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 12-11-2007, 09:49 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default

Haven't got a clue where to start with AJAX, you know any nice tutorials?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-11-2007, 10:35 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

There is an example for you. Give it a shot and you'll get the hang of it quickly:

Ajax load content from another file using POST or GET | Eire Web Design
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 12-11-2007, 10:53 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default

ah im so lost, cant get my head round it, think i need a break!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 13-11-2007, 12:06 AM
TheMenace's Avatar
Hardcore Geek
 
Join Date: Nov 2006
Posts: 750
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
TheMenace will become famous soon enough
Send a message via MSN to TheMenace
Default

The only way to load the content for the new dropdown on demand is AJAX. It's pretty easy if you already know PHP/MySQL and a little JavaScript.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 13-11-2007, 02:36 AM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default

Quote:
Originally Posted by TheMenace View Post
The only way to load the content for the new dropdown on demand is AJAX. It's pretty easy if you already know PHP/MySQL and a little JavaScript.
PHP & MySQL im fine with but i never really learned JavaScript, i understand the basics but the rest is beyond me!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 13-11-2007, 04:27 AM
TheMenace's Avatar
Hardcore Geek
 
Join Date: Nov 2006
Posts: 750
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
TheMenace will become famous soon enough
Send a message via MSN to TheMenace
Default

Quote:
Originally Posted by ziycon View Post
PHP & MySQL im fine with but i never really learned JavaScript, i understand the basics but the rest is beyond me!
You don't need to know much to be honest. Just how the HTTPRequest object works. Have a look at this tutorial.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
box, elect, function, selection

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.irishwebmasterforum.com/coding-help/2715-select-box-selection-function.html

Posted By For Type Date
Dependent Select Box using Ajax | Website Design Ireland, Website Development This thread Pingback 28-02-2008 01:33 PM
GiveItSocks.com This thread Refback 25-02-2008 02:17 PM
Ajax | Website Design Ireland, Website Development This thread Refback 10-01-2008 09:39 AM

Similar Threads

Thread Thread Starter Forum Replies Last Post
radio boxes and select boxes woes paul Coding Help 2 20-02-2007 02:56 PM
PHP function giving trouble. louie Coding Help 1 26-01-2007 11:51 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 08:55 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0