PDA

View Full Version : JS error on php page


kp006274029
05-28-2011, 08:57 AM
Hi,

I used the workaround for the greyed out populate list array issue. I than moved the code back from above the doctype and back to the origional location under the title tag, however when I view the page on my testing server. I get a JS error and the child list isnt populated.

looking at the source of the web page, I'm getting the following notice:

Notice</b>: Undefined variable: m in <b>C:\HostingSpaces\admin\happys.co.uk\wwwroot\admin\ items_Insert.php</b> on line <b>103</b><br />


Please find attached the items_insert.php page.

Many Thanks
KP

Jason Byrnes
05-31-2011, 12:56 PM
I believe this may be caused by the names of the select lists.

try using different names for the select lists such as "itemCategory" and "itemSubcategory"

kp006274029
06-01-2011, 06:02 AM
Hi Jason,

Figured it out, it was because one of the rows in my subcategory recordset had a blank foreign key which was meant to link to the parent category recordset. Deleted that row and it now works.

KP

P.S: Instead of moving the code for the dynamic array from one place to another as a workaround, it's easier just to detach the page from the template and than reapply the template to the page if required.

Jason Byrnes
06-01-2011, 06:39 AM
Ok, glad to hear it is working.