Closed
Bug 308412
Opened 19 years ago
Closed 19 years ago
Invalid ECMA constant prevents window.open()
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: daniel.oconnor, Unassigned)
Details
Attachments
(1 file)
|
1.09 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 A popup window is opened with an invalid name (08) and it triggers the below warning: vxpopup: Warning: 08 is not a legal ECMA-262 octal constant Source File: http://127.0.0.1/valfirm/details.php?tab=contacts&valfirm_id=2 Line: 1, Column: 50 Source Code: vxpopup( 'valfirm-contact-new.php?valfirm_id=2' , 0832746001126663981,450, 500); return false; Once this has been triggered once, component failures take place: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://127.0.0.1/presentation/js/core.js :: vxpopup :: line 28" data: no] Refreshing/reloading the page, etc has no effect, infact the entire browser must be closed and restarted to get everything working again. Reproducible: Always Steps to Reproduce: 1. Open an invalidly named window with window.open 2. Refresh page. 3. Try to open a validly named window. Actual Results: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://127.0.0.1/presentation/js/core.js :: vxpopup :: line 28" data: no] Expected Results: Window opens successfully
| Reporter | ||
Comment 1•19 years ago
|
||
vxpopup is merely an alias for window.open().
// creates a popup window
function vxpopup( url, name, width, height, rVal ) {
// left = (half screen width) - (half width)
// top = (half screen height) - (half height)
var ran_unrounded=Math.random()*5;
var ran_number=Math.round(ran_unrounded)*5;
var left;
var top;
left = (window.outerWidth / 2 ) - (width / 2) + ran_number;
top = (window.outerHeight / 2 ) - (height / 2) + ran_number;
x = window.open( url, "win" + name,
"'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=" +
width + ",height=" + height + ",top=" + top + ",left=" + left + "'" );
if(x.focus) { x.focus(); }
//This should work, but doesn't, to refresh parent onclose/whatever.
//x.onsubmit=opener.location.reload;
//x.onunload=opener.location.reload;
//Return false to stop page load continuing, even though it's success.
if (rVal) {
return rVal;
}
}
Comment 3•19 years ago
|
||
That's just a warning, it probably has no effect other than what you see in the JS console. What happens if you fix that constant? /be
Assignee: general → general
Component: JavaScript Engine → DOM: Level 0
QA Contact: general → ian
Comment 4•19 years ago
|
||
Reporter: If you don't reply to the comments here, I will close this report as WFM.
Comment 6•19 years ago
|
||
no answer from reporter in two months and testcase WFM -> resolving as WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•