This topic is locked

Dependency menus not working in edit page if the fields are blank

5/13/2008 11:21:23 AM
ASPRunnerPro General questions
M
mfred author

I have an application where a client side module addes new projects. The admin side then edits the projects. There are a series of dependent selection menus. The problem that I discovered is that the edit page errors out if any of the selections are left blank when first added. The error is:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'cstr'
/admin/include/commonfunctions.asp, line 1200
Line 1200 is if (CStr(value)="" or vartype(value)=11 and CStr(value)="False"
This has put me in a major bind because I was not expecting this error. Please advise as soon as possible.

J
Jane 5/14/2008

Hi,
it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

M
mfred author 5/14/2008

Thanks for the assist. However, I had to move forward and found that, instead of using the dependency menus for edit, I can have the first menu used as the display for the others. Unfortunately, I overwrote the original files. I should have saved them but was in a hurry. When I can, I will duplicate the issue. If anyone wants to explore this issue, the problem arose when there are multiple dependency menu groups, let's say A, B and C. On the add form, the user makes selections for A and B but does not make a selection in the C group. Then, when I try to edit the entry, The error shown in my initial post occurs. I figured out that it was the blank dependency menus by changing the fields for group C to text fields. The edit page would then load.