PDA

View Full Version : options.length is null or not an object.


Lee Firth
10-19-2009, 01:58 AM
I have a Dynamic Dropdown on a page which seems to work fine if I just go directly to the page in the browser. This page is part of a number of forms that update a record, when I arive at the page as part of the update process (it is form 3 or 3 forms) a parameter is passed as part of the querystring to open the same record again. If I try to use the Dynamic dropdown now I get an error message:

"options.length is null or not an object"

If I remove the parameter from the querystring and refresh the page, the dynamic dropdown works OK again.

OK I've done a little more troubleshooting. It has nothing to do with the querystring. In the previous page I edited the Update Record SB and deselected "Pass original querystring" and it still happens. Might be something to do with the fact that we arive at this page by means of a redirect?

Eric Mittman
10-19-2009, 03:01 PM
The only reason this page should change depending on how you get to it would be if you were filtering any of the recordsets on the page with any query string or other variables from a form post or something like that. If the data on the page is the same then the page should behave the same regardless of how you navigate to it. Please do some testing with this page and redirecting or linking to it to see if you can narrow down when this issue occurs. If it only happens under a curtain sequence then that would point to the data on the page changing as the source of the issue. Also do you have a link where this can be seen in some fashion?

Lee Firth
10-19-2009, 04:51 PM
Unfortunately this website is part of an intranet and I can not give you access to it. I have however recorded a screen capture video which demonstrates the problem I am having:

http://www.firthwebworks.com.au/recording.wmv (http://www.firthwebworks.com.au/recording.wmv)

Eric Mittman
10-20-2009, 04:31 PM
Thanks for the video. I have opened a ticket for you on this issue so we can exchange some files. Please login to the site and visit you support history to update the ticket. I think the problem is likely posted info on the last page but we will be able to see this better when I test it.

Eric Mittman
10-22-2009, 05:14 PM
The problem here was the name of your second select list, it was named referrer. This is also an internal value for the webpage that will hold the referring page address. Because of this that name should not be used.

The fix is to use a different name for the form element. If it is updated in all locations that it appears the problem should go away.

Lee Firth
10-22-2009, 08:34 PM
Thank you for your help on this issue Eric. I was scratching my head for hours trying to work out the problem.

Eric Mittman
10-23-2009, 01:36 PM
You are welcome, I too was scratching my head on this one. I have not seen anything like it before. I was glad that I found the problem and hopefully the knowledge learned will help me in the future if I encounter anything like this again. I hope you too have learned a little from this experience, it was an odd issue indeed.