Results 1 to 5 of 5

Thread: javascript coding guru help needed

  1. #1
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy javascript coding guru help needed

    I'm designing a dynamic webform for my company. what i need is that when you click on the dropdown box, for example, users choose 1, 2, 3,

    it will show the different fill in fields. If you go to www.globalreviews.com.au/rsvp.asp page, you will see one question asks: how many? i'd like when users select one, it will only ask to fill in one guest's details, if users select two, it will ask to fill in two guest's details, if three, it will ask for three guest's details...

    I'd really appreciated if someone can help me out.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Jan 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A little bug

    Hi,

    I am sorry to point this out, and though you have achieved what you wanted, I just found a little bug while I was viewing the website,

    when you have clicked on '4' and return to selecting less users the details field do not disappear. Also after you select more than '1' guests and revert back to selecting 'no', only one set of field disappear.

    Thought this will help you.

  4. #4
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Quote Originally Posted by parijaatp View Post
    Hi,

    I am sorry to point this out, and though you have achieved what you wanted, I just found a little bug while I was viewing the website,

    when you have clicked on '4' and return to selecting less users the details field do not disappear. Also after you select more than '1' guests and revert back to selecting 'no', only one set of field disappear.

    Thought this will help you.

    actually I know this bug, and trying to fix it up, but didn't succeed. Could you kindly to help me out?

  5. #5
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    1) CSS (!!!) use it! onmouseover and onmouseout can be replaced with :hover sub-class. macros are cool but CSS is the in-thing to do nowadays, i think.

    2) Select 4 guests right away from 1, means the default view for 2 and 3 are still false. So you need to add some calls to display('2',true)etc. for 3 and 4. 1 and 2 get away with it cause you never hide 1.

    personally, I would aim for a function that shows/hides similarly named divs based on a number & the common part of the names ( id="forms1",id="forms2",..., onclick="display(forms,#)" ).

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
  •