SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about Pulldown Forms/Jump Menu

    Hello. I have a script where users pull down a form and based on the answer, code spits out for them

    However, I want to create a demo for people where if they pull down the first value, the script does what it has to do

    however, if they choose any other option (choice b,c,d,e etc)
    there is a jump link like feature where a link opens a new window asking them to buy

    How do i program this pulldown to recognize what values need to link to another page?

    Thanks

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    function changer(obj) {
      if (
    obj == 'a')
        
    alert('a');
      else
        
    alert('b');

    PHP Code:
    <form name=frm>
      <
    select name=sel onChange='changer(window.document.frm.sel[selectedIndex].value);'>
        <
    option value='a'>aaa
        
    <option value='b'>bbb
        
    <option value='c'>ccc
      
    </select>
    </
    form
    Try that.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on edit. The function does help. All of that does
    I realized what to do after

    I am just sorta new to this

    How do I make the window (I added a redirect in the function, instead of the alert) popup to a new window? Just curious

    Thanks

    Ps. I am investigating, I won't just bug ya
    Last edited by nyc03; Feb 23, 2003 at 23:53.

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    self.open('pop.html''Title''width=200, height=200, scrollbars=yes, titlebar=yes, toolbar=yes, menubar=yes'); 


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
  •