SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Please help with "window.location.href"

    Hi,

    I have auto load drop down menu at http://laptopstation.co.uk/?id=79.

    it works in firefox well, but it does not work at EE and old browsers.

    IT WORKS IN FF AND OPERA. BUT DOES NOT WORK IN IE AND SAFARI

    I need it badly.
    Can anyone help me?
    Last edited by webn; Jul 22, 2009 at 11:32. Reason: For More Clarity

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is the code

    $return .= '<div class="content_box"><br />
    <div class="content_box_top"></div>
    <div class="content_box_middle">
    <div class="content">
    <div style="float: right; text-align: right;"><strong>Order by/strong>
    <select name="order" id="order">
    <option value="0" onclick="window.location.href=\'?id=' . $id . '&order=0\';"'; if( $order_by == 'ASC' ) { $return .= 'selected="selected"'; } $return .= '>Price: lowest first</option>
    <option value="1" onclick="window.location.href=\'?id=' . $id . '&order=1\';"'; if( $order_by == 'DESC' ) { $return .= 'selected="selected"'; } $return .= '>Price: highest first</option>
    </select></div><ul>';

  3. #3
    Forums Designer
    Join Date
    Jun 2004
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using onchange event for <select> instead of onclick for <option>.


Bookmarks

Posting Permissions

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