Selection from One SELECT changes selected option of another SELECT?

Discussion in 'HTML' started by J. Hall, Apr 21, 2004.

  1. J. Hall

    J. Hall Guest

    Hey dudes,

    This must be easy, but I've struggled for a night now to get it working!

    Basically, I want a system for a holiday site, whereby you select a FROM
    date (a SELECT of 1-31), upon selecting a value from this SELECT it will
    changed the currently selected option from a second SELECT (also populated
    with 1-31), BUT it will first add 7 (i.e. days)...

    ....e.g. if I were to select '4' from the first dropdown, the second would
    automatically go to '11'.

    Other issues here though are of course the Month and Year dropdowns, should
    the user select a START date that will mean the TO date would be in the
    proceeding month, I need to automatically move the SELECT box of the TO
    MONTH onto the next option?

    Checkout the feature working here on www.lastminute.com - I even attempted
    to look at their code, but its done via a series of complex functions, I
    need something a little simpler.

    Basically, I need a summary of how to change/read/alter selected for the
    SELECT object, and although I've searched everywhere, I've turned up nothing
    thats at all useful.

    Appreciate your help!

    Cheers, @sh
    www.net-performance.com
    J. Hall, Apr 21, 2004
    #1
    1. Advertising

  2. Please someone? this must be simple!!


    "J. Hall" <> wrote in message
    news:...
    > Hey dudes,
    >
    > This must be easy, but I've struggled for a night now to get it working!
    >
    > Basically, I want a system for a holiday site, whereby you select a FROM
    > date (a SELECT of 1-31), upon selecting a value from this SELECT it will
    > changed the currently selected option from a second SELECT (also populated
    > with 1-31), BUT it will first add 7 (i.e. days)...
    >
    > ...e.g. if I were to select '4' from the first dropdown, the second would
    > automatically go to '11'.
    >
    > Other issues here though are of course the Month and Year dropdowns,

    should
    > the user select a START date that will mean the TO date would be in the
    > proceeding month, I need to automatically move the SELECT box of the TO
    > MONTH onto the next option?
    >
    > Checkout the feature working here on www.lastminute.com - I even attempted
    > to look at their code, but its done via a series of complex functions, I
    > need something a little simpler.
    >
    > Basically, I need a summary of how to change/read/alter selected for the
    > SELECT object, and although I've searched everywhere, I've turned up

    nothing
    > thats at all useful.
    >
    > Appreciate your help!
    >
    > Cheers, @sh
    > www.net-performance.com
    >
    >
    Net-Performance.com, Apr 21, 2004
    #2
    1. Advertising

  3. J. Hall

    Jeff Thies Guest

    > Please someone? this must be simple!!

    It's not simple, but not that complex either.

    Why not post up what you have in comp.lang.javascript? This is a
    javascript thing rather than html.

    Roughly what you'll do (won't work without javascript) is getTime, add 7
    days worth of mSec and then use getDate,getMonth and getYear to find the
    values to set your rolldowns. There's tons of javascript date information
    with a little Googling.

    Cheers,
    Jeff

    >
    >
    > "J. Hall" <> wrote in message
    > news:...
    > > Hey dudes,
    > >
    > > This must be easy, but I've struggled for a night now to get it working!
    > >
    > > Basically, I want a system for a holiday site, whereby you select a FROM
    > > date (a SELECT of 1-31), upon selecting a value from this SELECT it will
    > > changed the currently selected option from a second SELECT (also

    populated
    > > with 1-31), BUT it will first add 7 (i.e. days)...
    > >
    > > ...e.g. if I were to select '4' from the first dropdown, the second

    would
    > > automatically go to '11'.
    > >
    > > Other issues here though are of course the Month and Year dropdowns,

    > should
    > > the user select a START date that will mean the TO date would be in the
    > > proceeding month, I need to automatically move the SELECT box of the TO
    > > MONTH onto the next option?
    > >
    > > Checkout the feature working here on www.lastminute.com - I even

    attempted
    > > to look at their code, but its done via a series of complex functions, I
    > > need something a little simpler.
    > >
    > > Basically, I need a summary of how to change/read/alter selected for the
    > > SELECT object, and although I've searched everywhere, I've turned up

    > nothing
    > > thats at all useful.
    > >
    > > Appreciate your help!
    > >
    > > Cheers, @sh
    > > www.net-performance.com
    > >
    > >

    >
    >
    Jeff Thies, Apr 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John
    Replies:
    5
    Views:
    969
    dorayme
    Mar 1, 2010
  2. Ted
    Replies:
    0
    Views:
    123
  3. Mark Kolber
    Replies:
    4
    Views:
    326
  4. WebRaster
    Replies:
    1
    Views:
    254
    Francisco Spaeth
    Oct 26, 2005
  5. Replies:
    1
    Views:
    195
Loading...

Share This Page