Forum Moderators: open
function go(){
location.href="pass+".html";
}
(the name of the page is the password)
Please help?
Javascript doesn't support forcing a maximized new window. One simple option would be to open the page [password].html in the original window - the one that spawned the pop-up window. That's a short line of code:
function go(){
newpage=pass+".html";
window.opener.parent.location=newpage;
}
If you want the pop-up to close, now that the password is entered, that takes one more line:
function go(){
newpage=pass+".html";
window.opener.parent.location=newpage;
self.close();
}
If you want to open the page in another brand new window (in addition to the original full window plus the popup - that makes 3 windows open) then the basic open.window() method will do the job. That opens a window with the size and other features that you specify, or it defaults to the browser's choice of size and features if you don't specify.
I'd suggest allowing the browser to decide, since many people who use large screens (1240 on up) don't browse with maximized windows and might not appreciate a fullscreen window being forced on them. Here's some code for that:
function go(){
newpage=pass+".html";
window.open(newpage)
}
If you really want to force the new page to as near to full screen as you can, then it gets more complex, because you must start taking measurements first. Let me know if that's really what you want and we will dig into it.
In let's say www.example.com/index.html thereis a javascript open pop.htm and visitor input form, sending form data using PHP Script..
Now the problem, i just want to know how i can get first URL where the popup come or the caller page that call popup page?
so in my email will received..
Name :
Address :
Page Visit : [example.com...]
etc.
is it possible?
self.opener.location.href
(You could get away with writing simply opener.location)
I think that in PHP, it ought to be $HTTP_REFERER, which would be a lot easier to use in this case. I'm not sure if it works for popups in this way; I've never tried it.