SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window.location question

    I have a problem with the following line:

    window.location='this.options[selectedIndex].value'

    Possible values are 1,2,3,4,5


    How can I edit the window.location line to make it display :

    window.location='order.php?id=5' (when 5 is selected)

    The ''order.php?id=' part should be added in the window.location line but I haven't been able to make it work

  2. #2
    SitePoint Zealot easyrew's Avatar
    Join Date
    Nov 2001
    Location
    Milton Keynes, UK
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey - bear in mind that its Friday, its lunchtime and I'm hungry and working from memory....

    But try this:

    Code:
    window.location='order.php?id='+this.options[selectedIndex].value
    Any good?

    Rich
    If a man stands alone in the forest
    and there's no woman around to hear him,
    is he still wrong?
    w: www.EasyRew.com

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd imagine that Should work.

    Sketch
    Aaron Brazell
    Technosailor



  4. #4
    SitePoint Zealot easyrew's Avatar
    Join Date
    Nov 2001
    Location
    Milton Keynes, UK
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Sketch
    I'd imagine that Should work.

    Sketch
    Thanks for the support and affirmation

    Rich
    If a man stands alone in the forest
    and there's no woman around to hear him,
    is he still wrong?
    w: www.EasyRew.com

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey, what are mentors for but to support and encourage!

    Sketch
    Aaron Brazell
    Technosailor



  6. #6
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    easyrew, that works!

    Thank you for helping me out!

    JamesBond


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
  •