| Issue 4158: | Javascript won't open an alert box when run from within a popup window | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Chrome Version : 0.3.154.9
Other browsers tested:
Safari 3: OK
Firefox 3: OK
IE 7: OK
What steps will reproduce the problem?
1. Link on web page must invoke Javascript to open a popup window
containing HTML form and Javascript code for form validation. There is no
problem in Google Chrome if the link is opened in a new window or tab using
target="blank".
2. Form validation Javascript code in the popup window invokes
alert(message) upon encountering an error within the form and sets focus to
the appropriate form element.
What is the expected result?
Google Chrome should display the alert box.
What happens instead?
Google Chrome will execute all Javascript code EXCEPT for opening the alert
box.
|
||||||||||||||||||||||||
,
Nov 06, 2008
Could you please provide detail steps/example so that we can reproduce this issue? I tried javascript alert box in popup window, Chrome can display the alert box properly.
Labels: -Area-Misc Area-Compat Need-more-info
|
|||||||||||||||||||||||||
,
Nov 07, 2008
same problem here.
Link opening content in pop-up window
<A HREF="javascript:NewWindow
('http://www.helloworld.dk/test.asp','name','500','525','no','yes')">
Using this javascript:
<SCRIPT TYPE="text/javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll,status){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings
= 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+sc
roll+',toolbar=0,location=0,menubar=0,status='+status+',dependent=0,titlebar=0,resiza
ble=0,locationbar=0'
win = window.open(mypage,myname,settings)
win.focus();
}
</script>
Confirm and alert javascript now suddenly doesn't work in the popup-vindue when user
e.g. tries to submit a form that uses a confirm function:
<FORM ACTION=buy_wait.asp METHOD=POST id=form name=form onSubmit="return confirm
('are you sure you want to delete?');">
We hope that you can solve this one out quickly. We have a lot of customers now not
being able to use our webservice while this issue persists.
Regards,
Bo
|
|||||||||||||||||||||||||
,
Nov 08, 2008
Having the same issue with our product and confirm/alert dialogs not showing in popup
windows.
popup links:
<a onclick="window.open('popup.html', 'test', 'height=470,width=550'); return false;"
target="_blank" href="popup.html">anchor popup</a>
<div onclick="window.open('popup.html', 'test', 'height=470,width=550');">div popup</div>
<input type="button" onclick="window.open('popup.html', 'test',
'height=470,width=550');" value="button popup">
popup.html window code to try an alert() and a confirm():
<body>
<input type="button" value="alert" onClick="alert('alert test');">
<input type="button" value="confirm" onClick="confirm('confirm test');">
</body>
Have tried a slew of window.open features - basically the only way an alert or
confirm will work is if chrome renders the "popup" in a new tab by default which
happens when you include 'menubar=1,status=1,titlebar=1,toolbar=1,scrollbars=1'
chrome will automatically open the "popup" in a tab in the default configuration.
|
|||||||||||||||||||||||||
,
Nov 10, 2008
Hi. I have exactly the same problem. THIS IS A SERIOUS BUG AFFECTING MANY WEB-APPS, PLEASE GIVE THIS TOP PRIORITY! Have attached two files to illustrate the problem... see zipped attachment. Just open the file: "start-chrome-popup.htm" first. |
|||||||||||||||||||||||||
,
Nov 10, 2008
The problem is caused by javascript method "window.open(URL, windowName[, windowFeatures])". If the 3rd parameter windowFeatures is specified, then alert box doesn't work in the popup constrained window in Chrome, here is a simplified reduction: http://go/reductions/4158/test-home-constrained.html If the 3rd parameter windowFeatures is ignored, then alert box works in the popup in Chrome(the popup is actually opened as a new tab in Chrome), like this: http://go/reductions/4158/test-home-newtab.html it doesn't happen in IE7, Firefox3 or Safari3, it's a chrome specific issue. See also attachments for simplified reductions
Status: Untriaged
Labels: -Need-more-info Has-reduction Chrome-specific JavaScript |
|||||||||||||||||||||||||
,
Nov 10, 2008
(No comment was entered for this change.)
Cc: o...@chromium.org m...@chromium.org
|
|||||||||||||||||||||||||
,
Nov 10, 2008
This looks like a recent regression.
Status: Assigned
Owner: e...@chromium.org Labels: -Area-Compat Area-BrowserUI Mstone-1.0 |
|||||||||||||||||||||||||
,
Nov 10, 2008
This broke (intentionally) in r2116. I'm going to revert 2116 from trunk and the release branch. We'll have to revisit the original bug with a different approach: this one does not work. |
|||||||||||||||||||||||||
,
Nov 11, 2008
This should be fixed (with unit tests based on the reductions to prevent this form happening again) in r5198. mal directly committed the one line fix in web_contents.cc onto the release branch earlier.
Status: Fixed
|
|||||||||||||||||||||||||
,
Nov 13, 2008
When will this fix be released? Thanks |
|||||||||||||||||||||||||
,
Nov 15, 2008
This will be fixed in 154.22, which should go to the Dev channel next week. The fix should make it to the Beta channel before the end of November. |
|||||||||||||||||||||||||
,
Nov 17, 2008
Verified in the official build Chrome: V - 154.22
Status: Verified
|
|||||||||||||||||||||||||
,
Nov 17, 2008
I cannot get java to work on Pogo. What steps do we need to do to fix this? How do we access V-154.22 and is this problem fixed? |
|||||||||||||||||||||||||
,
Nov 18, 2008
Chrome will only work with Java 6 Update 10. You can download that from: http://java.sun.com/javase/downloads/ The 0.4.154.22 release is a dev channel only release. If you're currently not subscribed to the dev channel, you might want to consider taking a look. Information about subscribing to the dev channel is here: http://dev.chromium.org/getting-involved/dev-channel |
|||||||||||||||||||||||||
,
Nov 18, 2008
Good job guys.... Tested the 0.4.154.22 (dev channel) and it worked as it should. Look forward to see this in a public release though..... |
|||||||||||||||||||||||||
,
Oct 26, 2009
Hi According to the above discussions, google chrome used 10 mths later should be showing alerts. I am trying today for a website - i have been using alerts to trace the flow of the code to take appropriate action, but the alert never happens, neither does the message get shown anywhere else. 26th Oct 09. Any help please? I have some deliverables tomorrow . |
|||||||||||||||||||||||||
| ► Sign in to add a comment | |||||||||||||||||||||||||