Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339375 - internal browser javascript not handling DOM appropriately
Summary: internal browser javascript not handling DOM appropriately
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 10:41 EST by g-dawg CLA
Modified: 2020-05-14 11:24 EDT (History)
1 user (show)

See Also:


Attachments
main wrapper page for app (4.03 KB, application/octet-stream)
2011-03-09 10:46 EST, g-dawg CLA
no flags Details
The opening content the wrapper loads on default. (810 bytes, application/octet-stream)
2011-03-09 10:47 EST, g-dawg CLA
no flags Details
file with content that debugger executes incorrectly (58.25 KB, application/octet-stream)
2011-03-09 10:48 EST, g-dawg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.