SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generating fields OnChange();

    Hello,

    can someone tell me how I can do this:

    I want to pick a value froma drop-down list and when I pick it, then it will generate fields for that form.

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me ask you this: do you know anything about JavaScript? If so, you could do something like this:
    Code:
    var newForm = document.createElement("form");

  3. #3
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I know how to make a validation form, I don't know how to do this, so I'm asking you guys heh.

    I was thinking that I would use document.write but then when I choose something else from the list how do I erase what's there and update with new fields?

  4. #4
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is an example of what I want
    http://msdn.microsoft.com/library/de...o/DXTidemo.htm
    (not the filters but how the form changes when you choose different stuff from the drop-down menu)

  5. #5
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm no that's not what I wanna do. Take a look on that link I posted.

    Basically when you select an item from the list it populates different fields.

  7. #7
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so no one knows how to do this?

  8. #8
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  9. #9
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thanx this will help alot

  10. #10
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WarJockey, why can't you just look at the code of the MSDN page that you posted and adapt it to your needs?


    M@rco

  11. #11
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    err matt posted that code and I did look at the MSDN but couldn't find it.
    Good thing you guys are helpful

  12. #12
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just download the page at this URL with a download manager (or with scripting switched off in your browser):
    http://msdn.microsoft.com/workshop/s...htm?frame=true

    The code is there to see! But beware, it will be IE only - is that relevant for your particular purposes? (Perhaps you are on a LAN and know that each client runs IE 5+)


    M@rco

  13. #13
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah I did look at that page's source and couldn't see how they did it.
    Oh well now I know tho and that's good.


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
  •