Hi,
I have a website with a client area which allows clients to type in a password into a form and upon submit load their specific page. It’s not really a password system – the password is simply the name of the webpage minus the ‘.html’ (security isn’t an issue!). At the moment from the main site a popup window can be opened containing the password form. Once the password is submitted, the popup is automatically closed and the relevant client page is loaded into the parent window of the main site. I’m using the following code to achieve this:
[CODE]function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + “.html”
fetch(location)
theKeeper=window.close()
}
function fetch(location) {
var root;
if (opener.closed) {
root=window.open(”,’theKeepersGopher’,’toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no’);
root.location.href = location;
} else {
opener.location.href = location;
}
}
My problem is I want to load the client page into a new browser window rather than the parent window of the main site. I imagine I need to add a ‘target=”blank”‘ somewhere, but my javascript knowledge is poor, so I don’t know where! Any ideas? Help would be greatly appreciated!