Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 42

Thread: Location drop down by State and City

  1. #11
    Rookie
    Not a Verified Customer
    tristan's Avatar
    Join Date
    Sep 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    How can you add more than 4 options to the first drop down??

    Every time I try, it just hangs with the 2nd drop down box empty.

    Any help would be great! Thanks

    -Tristan

  2. #12
    Amateur
    Not a Verified Customer
    ababu's Avatar
    Join Date
    Sep 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    did you tested this feature in non IE browsers? because you used the microsoft xml request handler objects. I am just guessing.

    it would be great if you test this feature in cross browsers.

    Thanks,
    Babu
    Admark.in

  3. #13
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Quote Originally Posted by ababu
    did you tested this feature in non IE browsers? because you used the microsoft xml request handler objects. I am just guessing.

    it would be great if you test this feature in cross browsers.

    Thanks,
    Babu
    Admark.in
    Works in IE, Firefox and Opera and Chrome, I'm one of those guys (aka: nerds) with like half a dozen browsers installed.

  4. #14
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Re: Location drop down by State and City

    Great tutorial,
    But I need something more simple, I need to show only 4 locations. And the user select one of 4 locations.

    Someone could help me?

    Code:
    <label for="location"><?php _e('Location','cp'); ?> <span>*</span></label>
    				<input type="text" id="location" class="adfields" name="location" size="60" maxlength="100" value="<?php echo $_POST['location']; ?>" />
    Thanks

  5. #15
    Newbie James's Avatar
    Join Date
    Nov 2009
    Location
    United Kingdom
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Does anyone know if the following is possible using similar code to above...

    My categories are cities and I would like the first drop down to be the category (city) then the second drop down would be the location choice.

    So exactly as it is above however the first choice you choose would be the selection for the actual category.

    If that makes sense?

    Any help is appreciated, tried different ways to get the code to work but no luck so far!

    Thanks

  6. #16
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Quote Originally Posted by xiscomax
    Great tutorial,
    But I need something more simple, I need to show only 4 locations. And the user select one of 4 locations.
    Code:
    <abel for="cat">Choose Something </label>
    <select name='cat' id='cat' class='postform' >
    <option value='-1'>Select One</option>
    <option class="level-1" value="option 1">option 1</option>
    <option class="level-1" value="option 2">option 2 </option>
    <option class="level-1" value="option 3">option 3 </option>
    <option class="level-1" value="option 4">option 4 </option>
    </select>
    Something like that but you have to either add a new info field or use a current one.
    viewtopic.php?f=11&t=209


    Quote Originally Posted by Jimmy
    My categories are cities and I would like the first drop down to be the category (city) then the second drop down would be the location choice.
    http://wpguru.co.za/navigation/creating ... lect-menu/

    Code:
    <? if ($_GET['ch'] == 'Botswana') { ?>
    <?php wp_dropdown_categories('child_of=33&name=cat'); ?>

  7. #17
    Newbie James's Avatar
    Join Date
    Nov 2009
    Location
    United Kingdom
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Thanks for the help...

    That would only select for the Category which is for cities.

    What I was meaning was the first drop down would be the category (the city) and when the second drop down appears it would show towns within that city and the selection from the drop down would be the location field for classipress.

    At the moment I have the category dropdown as normal which is cities the poster needs to select the city from the category, then would have to select it yet again in the location drop down above - I would like to implement the category selection into the above...

    So more or less exactly as what the above code is except the first dropdown is the category selection for classipress ad and the second drop down is for the location of the ad so two separate fields would be completed.

    So option one would be the City - Category Field
    Option two would be the Town - Location Field

    Thanks

    J

  8. #18
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Gracias Damien
    * Con su código eh conseguido.

    Code:
    <label for="location">Seleccionar <span>*</span></label>
    <select name='location' id='location' class='postform' >
    <option value="<?php echo $_POST['location']; ?>" selected><?php _e('Location','cp'); ?></option>
    <option value="option 1">option 1</option>
    <option value="option 2">option 2</option>
    <option value="option 3">option 3</option>
    <option value="option 4">option 4</option>
    </select>
    * ¿Es correcto?

    * El e provado y parece que funciona, pero me gustaría que alguien me informe que funciona bien.
    * Thankss

  9. #19
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Damien thanks.

    With your code eh achieved this.

    Code:
    <label for="location">Seleccionar <span>*</span></label>
    <select name='location' id='location' class='postform' >
    <option value="<?php echo $_POST['location']; ?>" selected><?php _e('Location','cp'); ?></option>
    <option value="option 1">option 1</option>
    <option value="option 2">option 2</option>
    <option value="option 3">option 3</option>
    <option value="option 4">option 4</option>
    </select>
    is that correct?

    The e provado and seems to work but I would like someone to inform me that works well.
    Thanks

  10. #20
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location drop down by State and City

    Someone thought tpl-edit-ad.php

Page 2 of 5 FirstFirst 1234 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)