> I want my web page redirect to open in a new window, as if I were > putting "target=_new" in the html of the URL. How can I do that using > CGI.pm's redirect? I have this: > > print $output->redirect($u) > > with $u being the URL I am redirecting, too. >
The problem is that the redirect is providing an HTTP header back with the new location and a result code that instructs the browser to find the page at the new location, this is working at the protocol level which has no knowledge of windows, targets, etc. So using 'redirect' is not likely to get you anywhere at the client level. Generally I would think your best bet would be to have the link itself use a standard target, which for some reason you seem to be avoiding, reasons? Alternatively you could pass back some javascript for the onLoad handler and have it pop the new redirect in a new window, but the problem I see here is that the browser will have already cleared the window's contents and "loaded" a new page, so the same handler would need to restore the previous contents, which gets real ugly, especially if the referer is POST'ed. I wouldn't even want to think about the nightmares dealing with different versions of browsers + javascript, etc. However if your referer is static and you can guarantee it then it wouldn't be as much of a problem. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>