35 users online (0 members and 35 guests)  


  Results 1 to 4 of 4

Related

  1. Horizontal Scrollbar in List    Forum: HTML Forum
    Replies: 4
  2. Horizontal scroll bar fix    Forum: CSS Forum
    Replies: 0
  3. Horizontal scroll bar fix    Forum: HTML Forum
    Replies: 0
  4. Replies: 6
  5. Replies: 5
  1. #1
    paul9038's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    8

    Question Horizontal scroll bar in select list advice.

    Hi,
    I am building a static database query page using PHP/mySQL. Because the database is large but constant it was decided to develope a set of Javascript arrays to populate various select and drop down lists with a controlled set of possible query options. In particular the contents of one drop down list(B) are dynamically populated from an onchange() call on another drop down list(A). An onchange() call on drop down list(B) will further populate the contents of a multiple select list(C) from which the user can select a number of options and submit a query to a PHP page. All this is controlled client side with Javascript but the problem I am having is that Select List(C) can contain very large user choices that expand the list off the screen. I have found style sheet code for a select tag that controls the screen format by setting a tag width --<select style="width: 100px"> -- but can I set the select or options tag to either wordwrap or include a horizontal scroll bar. If there is an options tag setting how would I include this as I am currently producing the options lists dynamically using a function the calls the Javascript new Options() constructor i.e would I have to build the options lists differently.
    The only other possibility of solving this problem, that I am hoping will not be required, is to force Select list(B) to display Select List(C) in a popup window where I would have more screen space to play around with. At the moment this seems to be my only choice so if anyone has any sample code or advice for creating a select list in a popup window from a drop down list on the original window and then passing the popup window values back to the original window I would really appreciate it.

    Thanks
    Paul9038

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Good question.

    Off-hand, I cannot think of a way around this. I think your options are limited to your own ideas above. Looks like the popup might be easiest.

    You can write a value back to a form on the opening page like this -

    Code:
    onclick="opener.formname.inputname.value=popupformname.popupselectname.options[popupformname.popupselectname.selectedIndex].value;"
    Thats rough, but hope you get the idea. Post back if you need more.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    paul9038's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    8

    Thanks

    Thanks for your time and advice. I ran with the pop up window option, hopefully the clients like it.

    Paul

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Brilliant. Glad to help.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread