Results 1 to 8 of 8

Thread: Dynamic <select> form fields - IE sudden crash

  1. #1
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Dynamic <select> form fields - IE sudden crash

    I have a page with 3 form fields, call them A, B, and C. When a selection is made in A (onchange) JS will build B and C lists. When B (onchange) creates C list. When script starts it creates A, then B, then C.

    Works fine in FF. And seems to work ok in IE7 at first, but unstable? After changing selections a few times the IE suddenly crashes. No error appears. Just sudden program closure.

    Can someone give me some hints on what can be causing this, what to look for? I am gonna reprogram now, but don't want to do a lot of work to discover same error. Perhaps I am missing some understanding.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Probably an open loop or other memory bug causing the program to overload.

    If you post the code, someone can probably find the troublesome part.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It would be very hard to say without seeing your code, and if as you say, there is no error message, even then it could be a bit hard to tell, but we will give it a shot if you give us a link to the problem page.

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Just emailed you guys. Would much prefer to discuss online and share the code privately. Hope you understand. I am much appreciative of this dynamic drive!

    THANKS for responding. Hope we can find the bug. email me at ancraig a@t hotmail d.o.t com .

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I got your email. I will have a look at the links later. For now I want to mention that using tables isn't always bad. Tables are for tabular data. If you have a form where folks need to enter data in a columnar form, tables are what you should use.

    Oh, and I'd like to add that sending the links in email is fine. I can certainly understand anyone who would prefer not to have search engines find the forum here when folks are looking for your page and other issues like privacy, etc.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, now I have looked at the two links. I like the concept! To save time though, what should I click on and/or fill out to observe the problem? If more than one set of actions is required to see the problem, how many?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    If you change country to canada, then play with locality, then change country to USA, then change locality, then change to canada .... like that it'll kill IE.

    Am thinking perhaps it has to do with the way I seperated USA locations from rest of work (cause the list gets too long). Is it possible IE is expecting some variable and when it doesn't see the variable it crashes? Thought that's why errors occur, not sudden crash.

    Sent you a bunch of code to review. Thanks! Will discuss things if you are confused with some of it. That back and forth discussion might even elucidate the issue.

    FYI, I am gonna rewrite this whole thing. Have restructed my data into associative arrays and will address the situation differently. But don't want to move forward without understanding my F-up in existing code.
    Last edited by Aaron; 08-20-2007 at 06:26 AM. Reason: reduce

  8. #8
    Join Date
    Jun 2007
    Posts
    34
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Have rewritten my code and still the problem exists.

    Am thinking it might be something to do with the way I delete all select options, then redefine them dynamically. Could be something to do with an option being selected (of IE thinking it is selected) but then I delete it and it doesn't exist which confuses IE so it crashes? Did a google search and found this:

    http://support.microsoft.com/default...17&Product=iep

    It seems close enough to be high on likely connection.

    My situation is that options in list B "child" are dependent on selected option is list A "parent".

    I will try to rewrite my code this way: when a "child" select list is to be modifiied dynamically I will first programatically select the 0 element (first in list) and not delete that element (the 0th element). Then will delete all other elements. Then will redefine first element (0th element) & create all other elements appropriate to the "parent" selection.

    Fingers crossed!
    Last edited by Aaron; 08-20-2007 at 08:17 AM.

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
  •