SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Location
    Carrollton, TX
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing select drop down from 2nd page

    I am trying to add a search button next to a select drop down with a HUGE amount of data. The search button opens a popup window that allows you to narrow down choices and select one that is in the drop down(that part works). However I can't seem to pass the parameter selected back to the drop down on the first page to have it as the selected item.

    I am working with the scripts in the popup window, and I am trying:

    window.opener.document.forms(0).Product(lngBoxNumber).value = x

    forms(0) I think that is the first window.
    Product(1) is the name of the drop down.
    x is the value I am trying to assign.

    Please Help! Thanks.

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using braces [] instead of parentheses. If that doesn't work I think you'll need to post some more of the code or the urls.

  3. #3
    SitePoint Member
    Join Date
    Jul 2001
    Location
    Carrollton, TX
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I figured it out.

    window.opener.document.forms(0).Product(lngBoxNumber).value = x

    This code is fine, but I had meant to call Product1 (the name of the drop down on the form) not Product(1) ... to do this I used a variable call strBoxName = "Product" & i, and then changed the syntax to:

    window.opener.document.forms(0).item(strBoxName).value = x

    Need to check my variables more carefully.

    Thanks for the help Anarchos.


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
  •