Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
139
rated 0 times [  144] [ 5]  / answers: 1 / hits: 54109  / 11 Years ago, fri, september 13, 2013, 12:00:00

I'm trying to execute Javascript on my web application by executing this on the browser URL/address bar:



javascript:window.alert('test');void(0);


However, nothing happens and the alert box is not showing up? Could the reason be that the app is running in DevMode?


More From » gwt

 Answers
40

I believe most browsers refuse to execute javascript: URLs from the URL bar as a safety measure (there's been messages on the web –esp. Facebook– telling people to copy-paste a javascript: URL to their URL bar that triggered an XSS). They didn't want to break bookmarklets though, so you can put that code in a bookmark; but it's much easier to just open the browser's JS console and type that command there.



Anyway, it's not due to GWT's DevMode.


[#75712] Thursday, September 12, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jonmicahm

Total Points: 603
Total Questions: 120
Total Answers: 108

Location: Guam
Member since Fri, Jul 31, 2020
4 Years ago
;