+ Reply to Thread
Results 1 to 5 of 5

Thread: dependent select - ajax issues

  1. #1
    jorden is offline Frontpage User jorden will become famous soon enough
    Join Date
    Jul 2008
    Location
    across the pond
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  2. #2
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    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

  3. #3
    jorden is offline Frontpage User jorden will become famous soon enough
    Join Date
    Jul 2008
    Location
    across the pond
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!!

  4. #4
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    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
    :. 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

  5. #5
    garycocs's Avatar
    garycocs is offline Wannabe Geek garycocs will become famous soon enough
    Join Date
    Oct 2007
    Location
    Dubland
    Posts
    326
    Thanks
    2
    Thanked 0 Times in 0 Posts

    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?

+ Reply to Thread

Similar Threads

  1. 'Select Box' Selection Function
    By ziycon in forum Coding Help
    Replies: 33
    Last Post: 13-09-2009, 01:23 AM
  2. AJAX and Accessibility?
    By blacknight in forum Coding Help
    Replies: 8
    Last Post: 29-10-2006, 01:31 PM
  3. AJAX PHP Books
    By louie in forum Coding Help
    Replies: 26
    Last Post: 29-08-2006, 03:00 PM

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

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 52 53 54 55 56 57 58 59 60 61 62 63 64