Gossamer Forum
Home : Products : DBMan : Customization :

Too Many Select boxes crashes IE

Quote Reply
Too Many Select boxes crashes IE
I am creating a data-entry form with 60+ select fields (drop down). It works fine in Netscape and Mozilla but Internet Explorer (windows 98) scrambles the display and/or crashes. The Microsoft Knowledge base has an article about this and a complicated work-around (the workaround uses java and VB script). KB#265489.
Any other ideas?
I'd really like to keep it all on one page, and still have it work in Netscape!
I found one post in the forum saying long html lines may cause a similar problem ...
thanks
Larry
Quote Reply
Re: [lcj] Too Many Select boxes crashes IE In reply to
I had a similiar problem with having to many select fields for a large survey I created in DBMan. What I did to help resolve the problem was to use a mod which would display the choices in the add form but store a much shorter version within the db.

Search either here in the DBMan forums or the FAQ noted below for "sub build_select_option_fields" and see if that will help solve the problem for you.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Too Many Select boxes crashes IE In reply to
Thanks for the help. I think I just have too many select fields. I pared it down as much as possible and it displays OK but it seems like it still makes IE crash once in a while. This may be more of an HTML problem than a DBMAN problem, but can I split the ADD form into 2 web pages and still somehow SUBMIT both pages into 1 record? Not even sure what to search for in gossamer forum.

http://www.ibaip.org/...dbman/db.cgi?db=ifsp

log in as bob, pw bob also. Try to ADD a record...
Quote Reply
Re: [lcj] Too Many Select boxes crashes IE In reply to
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=214862

Check out this post. There's another one that someone did, but I could find it. It involved an example of using fruit and a bunch of pull-down boxes that was spread over 2 pages (?).

Anyway... If you use the above files you'll pretty much have to start over on your layout and configuration (it's not a 'plug n play' mod) but I think it will suit your needs.

Do any of your pull-downs repeat the same info over and over? If so, you could make a subroutine that contains the pull down info and then call it into the form. I do something similar where all the US states are listed in several spots.
Quote Reply
Re: [Watts] Too Many Select boxes crashes IE In reply to
Thanks! This is exactly what I need to do if I'm gonna break it up, glad you already did most of the work. The pull-downs on my form are very repetitive, but they are generated by the sub build_select_fields routine, or is there a more efficient way of doing it? I don't think that's necessarily the thing that causes IE to crash anyway, it's just the number of select boxes.

I'm also considering using java script to narrow down the choices and not display all the boxes at once.
Check this out:
http://www.devguru.com/...ge_base/A100209.html

I haven't figured out how to get the values selected in the java-boxes into the database yet!

Larry
Quote Reply
Re: [lcj] Too Many Select boxes crashes IE In reply to
Also check out http://javascript.internet.com (no "www"). The have a lot of snippets of code - look under Forms for some examples.

I just 'hand type' my select boxes in html.pl, but I use two formats depending on the application.

Format #1
<SELECT NAME="color">
<OPTION VALUE="$rec{'color'}">$rec{'color'}</OPTION>
<OPTION VALUE="blue">blue</OPTION>
<OPTION VALUE="red">red</OPTION>
<OPTION VALUE="green">green</OPTION>
</SELECT>

Format #2
<SELECT NAME="color">
<OPTION VALUE="blue" |; if ($rec{'color'} eq "blue") {print qq| SELECTED|;} print qq|>blue</OPTION>
<OPTION VALUE="red" |; if ($rec{'color'} eq "red") {print qq| SELECTED|;} print qq|>red</OPTION>
<OPTION VALUE="green" |; if ($rec{'color'} eq "green") {print qq| SELECTED|;} print qq|>green</OPTION>
</SELECT>

Both work equally as well. The first one is just easier to do and allows you to enter "Choose a Color" or something as a default value in default.cfg

Last edited by:

Watts: Feb 25, 2004, 12:11 PM
Quote Reply
Re: [Watts] Too Many Select boxes crashes IE In reply to
In the multi-page mod, why do you have to list all the "hidden" fields, can't you just NOT list them at all, e.g. don't list fields from page 2 in the code for page 1??

thanks
Larry
Quote Reply
Re: [lcj] Too Many Select boxes crashes IE In reply to
Yes and no. Technically you are correct, but if you don't list the hidden fields then it causes a problem when modifying the record, or when switching between pages. So if you can guarantee your users are only going to "add" a record and will go from page 1 directly to page 2 then you don't have to list the hidden fields (from page 2 into page 1).

In some of mine I have as many as 12 pages and my users can "jump around" from page 5 to page 3 to page 10, so any pages that didn't contain all of the other hidden data would basically wipe-out whatever was already there.
Quote Reply
Re: [Watts] Too Many Select boxes crashes IE In reply to
I appreciate your help , I was really at a dead-end with this project!
I got it working (see URL above), I broke it into two pages and the browser doesn't crash anymore.
I just barely understand the perl code, not sure if the "continue" button works right on page two. I just hacked the modify form so it looks like an "add" form after you submit page two, we aren't going to allow modifications anyway. I guess I'll have to give permission to users to modify, so that this works, but I'll hide the "modify" buttons on the footers.
Quote Reply
Re: [lcj] Too Many Select boxes crashes IE In reply to
Looks like you got it working!

The continue button appears to be working okay on page 2.

You can hide the modify button in the footer.

Good Luck.