Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339375

Summary: internal browser javascript not handling DOM appropriately
Product: z_Archived Reporter: g-dawg <gdv.pops>
Component: PDTAssignee: PHP Debug <php.debug-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
main wrapper page for app
none
The opening content the wrapper loads on default.
none
file with content that debugger executes incorrectly none

Description g-dawg CLA 2011-03-09 10:41:14 EST
Build Identifier: 20100617-1415

I am attempting to debug a PHP web page in eclipse and the javascript crashes due to it detecting a DOM element (document.getElementsByName()) as an empty array.  I run this exact same file on my local web server (same as debugger is linked to) and it works in an external browser - finding the elements.

I have put an alert into the javascript (in the validateData() function on line 1432 of profile.php), to give me a length on the array returned.  
In the internal browser, it gives me '0' and prevents my javascript function from proceeding, preventing me from getting to the PHP script that I need to debug.
In an external browser (IE), it gives me '1' and the javascript proceeds normally and then the PHP script hits its bug and I can't see what's going on to fix it.

Reproducible: Always

Steps to Reproduce:
1.Open main file in PHP Debug perspective
2.Navigate to the "Your Information" view
3.Select "Submit" tab
4.Type 'yes' into the field and click submit button
Comment 1 g-dawg CLA 2011-03-09 10:46:23 EST
Created attachment 190765 [details]
main wrapper page for app

This is the page needed to wrap the home.php and profile.php files.
Comment 2 g-dawg CLA 2011-03-09 10:47:14 EST
Created attachment 190766 [details]
The opening content the wrapper loads on default.
Comment 3 g-dawg CLA 2011-03-09 10:48:36 EST
Created attachment 190767 [details]
file with content that debugger executes incorrectly

this file has the line of code that is executed incorrectly in the debugger browser.
Comment 4 g-dawg CLA 2011-03-09 11:39:13 EST
I am not sure what the reason is for this not working in the internal browser, but I found a work-around and have updated my conditional statements to check the length of the array rather than the existence of the array.  It seems to be working appropriately with that change.