Javascript SecurityError
I am using this JS command to openn new dialog window and btw pass parameters to use them in the newly opened window. However I get SecurityError in firebug.
var param1= "Internal";
var param2= "Saved";
var url = "http://localhost:8080/player/bin/index.html"
functon callPlayer(){
newWindow = window.openDialog(url, "Hello", "", param1, param2);
}
What could be causing the problem?
Also is it possible somehow with the basic window.open method to send JS parameters that can be used in the new window (or maybe with document.write or innerHTML)?
I use FlashDevelop so it has bin folder with index.html file which is loaded in the new window (index.html loads the swf in it). So basically I want the swf player loaded in the window, but I need parameters from JS which come from database server so that why i want to send params to the new window. (An I must use new window c开发者_运维百科oz I have grid with rows, and every row opens ne window with other parameters)
I solved the problem like this: I used window.open
not window.openDialog
and after that line I setup manualiy window parameters like this:
newWindow.param1="Internal";
newWindow.param2="saved";
And for the Security error I still get it when using openDialog
. Not sure why.
精彩评论