|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Please help with windows
I sure hope u can help me. I have the following program:
<script language="javascript" type="text/javascript"> <!-- /************************************************** ** Author: Eric King Url: http://redrival.com/eak/index.shtml This script is free to use as long as this info is left in Featured on Dynamic Drive script library (http://www.dynamicdrive.com) ************************************************** **/ var win=null; function winopen(w,h,scroll,pos){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.rand om()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20} settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+',scrollbars='+scroll+',l ocation=no,directories=no,status=no,menubar=no,too lbar=no,resizable=no'; win=window.open("sponsorinput.php", "newWindow",settings);} // --> </script> <script language=JavaScript> function closeme() { window.opener.location.href=window.opener.location .href; self.close() } </script> </head> <body onLoad="javascript:closeme();winopen('850','575','yes','ce nter')"> </body> However, when it tries to run the one line in red it stops and gives me an error which states "Permission denied". Why is this and how can I correct it? Dan and thanks |
|
#2
|
||||
|
||||
|
It's probably the case that a child window can't redirect a parent window to another site. Imagine a sort of cross-scripting scenario in which someone submits form data to a form that's displayed to the screen for others to see (as in a blog comment). If the person submitted some js code that opened and wrote a window redirecting the parent window to a malicious site, anyone viewing the page after this person would be screwed. I'm not sure that's what's going on, but it seems plausible.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Please help with windows |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|