Hiding/Showing controls w/ VBScript during Page Load.

Discussion in 'ASP General' started by MN, Oct 10, 2005.

  1. MN

    MN Guest

    Greetings to all -

    I'm having some fits with getting this to work but I'm near the end and I'm
    hoping this one obstacle is not a huge one to get past.

    Here's my scenario:

    I have a page where when someone clicks on a dropdown and selects an item,
    it will hide 2 other dropdown boxes that are related as the input in those
    are applicable. When I save those items, everything gets into the db fine.
    The problem is when the page refreshes, those 2 related dropdown boxes that
    should be not visible are still visible. Is there a way in VBScript to
    hide/show those controls based on the data in dropdown A? Javascript is
    handling the actions but I don't think I can call Javascript on page load.

    Any thoughts are welcome. I'm quite confused on any other options.

    Thanks,
    MN
     
    MN, Oct 10, 2005
    #1
    1. Advertising

  2. MN

    Curt_C [MVP] Guest

    You will have to have a catch on the page (hidden form item perhaps) and read
    that in when the page POSTs back, and then use that value to determine if you
    hide/show it.

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "MN" wrote:

    > Greetings to all -
    >
    > I'm having some fits with getting this to work but I'm near the end and I'm
    > hoping this one obstacle is not a huge one to get past.
    >
    > Here's my scenario:
    >
    > I have a page where when someone clicks on a dropdown and selects an item,
    > it will hide 2 other dropdown boxes that are related as the input in those
    > are applicable. When I save those items, everything gets into the db fine.
    > The problem is when the page refreshes, those 2 related dropdown boxes that
    > should be not visible are still visible. Is there a way in VBScript to
    > hide/show those controls based on the data in dropdown A? Javascript is
    > handling the actions but I don't think I can call Javascript on page load.
    >
    > Any thoughts are welcome. I'm quite confused on any other options.
    >
    > Thanks,
    > MN
    >
     
    Curt_C [MVP], Oct 10, 2005
    #2
    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. Dré

    FAQ-page => showing/hiding text

    Dré, Feb 9, 2004, in forum: Javascript
    Replies:
    5
    Views:
    108
    Bas Cost Budde
    Feb 9, 2004
  2. LastOfEight

    Hiding Tables at Page Load

    LastOfEight, Nov 11, 2004, in forum: Javascript
    Replies:
    1
    Views:
    100
    Michael Winter
    Nov 11, 2004
  3. Replies:
    18
    Views:
    146
    Thomas 'PointedEars' Lahn
    Jul 3, 2005
  4. Mike Dee
    Replies:
    3
    Views:
    334
    Mamidipalli
    Mar 1, 2006
  5. Ste
    Replies:
    41
    Views:
    840
    Thomas 'PointedEars' Lahn
    Aug 1, 2007
Loading...

Share This Page