Irish SEO,  Marketing & Webmaster Discussion

 

dependent select - ajax issues

This is a discussion on dependent select - ajax issues within the Coding Help forums, part of the Webmaster Help category; I am unable to get Louie's select box magic working. I've added the closing script tag and replaced `s with ...


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

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

  #1 (permalink)  
Old 29-07-2008, 05:41 PM
Frontpage User
 
Join Date: Jul 2008
Location: across the pond
Posts: 2
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
jorden will become famous soon enough
Default dependent select - ajax issues

I am unable to get Louie's select box magic working. I've added the closing script tag and replaced `s with ' as well as updated the include_once link to page2.php
everything else is cut and paste and I can not get his script to work.

the select boxes both appear but upon selecting an option the second box does not change unless I use the submit button. I have a particular need for dynamic select boxes as I have 3-15 options in the first select and up to 70 options in a second select depending on the option in the first and don't want to cary all that code in the doc... but alas, I'm stumped even after reading several articles and posts on the subject.

http://netviper.com/test/page1.php <-- currently working on it
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 29-07-2008, 06:20 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,204
Nominated 6 Times in 4 Posts
Nominated TOTW/F/M Award(s): 1
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

first fix this line in your javascript:
Code:
 if ( xmlhttp_obj.readyState == 4 &amp;&amp; xmlhttp_obj.status == 200 ){  
 
//to
 
 if ( xmlhttp_obj.readyState == 4 && xmlhttp_obj.status == 200 ){
than get back to me on this as is due to copy and paste issues
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Car Parts & Accessories Car Parts
:. Cars Ireland Cars Ireland
:. 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
  #3 (permalink)  
Old 29-07-2008, 06:30 PM
Frontpage User
 
Join Date: Jul 2008
Location: across the pond
Posts: 2
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
jorden will become famous soon enough
Default

you da man... I could swear I fixed that after reading your post from last year.
It appears to be working though I need to modify it now to have two select boxes dependent on the and not hierarchal (sp?) and then connect it to my
db

any cautions with the above before I proceed?

either way, Thank You!!
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 29-07-2008, 07:40 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,204
Nominated 6 Times in 4 Posts
Nominated TOTW/F/M Award(s): 1
louie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud oflouie has much to be proud of
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

Cautions? - Sanitise the QS before accessing the DB

That is a very simple sample and can do the magic alright, but there a very good frameworks out the that could do more than one AJAX call simultaneously which is very handy - like Yahoo YUI
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 01-08-2008, 10:32 PM
garycocs's Avatar
Wannabe Geek
Recent Blog:
[CaRP] XML error: SYSTEM or PUBLIC, the URI is missing at line 1
 
Join Date: Oct 2007
Location: Dubland
Posts: 241
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
garycocs will become famous soon enough
Send a message via AIM to garycocs Send a message via MSN to garycocs Send a message via Yahoo to garycocs Send a message via Skype™ to garycocs
Default

More than one Ajax call simultaneously??

How come the ajax is refreshing the entire div and not just the contents of the select box?
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
ajax, dependent, issues, select

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


Similar Threads

Thread Thread Starter Forum Replies Last Post
'Select Box' Selection Function ziycon Coding Help 31 23-01-2009 09:39 AM
AJAX and Accessibility? blacknight Coding Help 8 29-10-2006 12:31 PM
AJAX PHP Books louie Coding Help 26 29-08-2006 03:00 PM


Sponsored links

Pepperjam Network
Paid On Results www.zanox.com


All times are GMT +1. The time now is 07:14 PM.


Powered by: vBulletin Version 3.8.2, Copyright ©2000 - 2009, 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.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51