CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [ImpInTraining] Perl script to open new window: Edit Log



Zhris
Enthusiast

Mar 23, 2013, 8:42 PM


Views: 512
Re: [ImpInTraining] Perl script to open new window

Hey,

Not entirely certain what you are trying to achieve, I don't fully understand your requirements.

Maybe the following will help:

- $ENV{'SCRIPT_URI'} might be available to you and will contain the URL you have landed on (non standard mod rewrite environment variable). Dump %ENV and see what you have available to use.
- You can open a new window using javascript.


Code
my $log_url = qq{$scripturl?action=logrolldisplay}; 

if ( $ENV{'SCRIPT_URI'} eq $log_url )
{
# already looking at log therefore redirect.

# perform redirect...
}
else
{
# not looking at log therefore open new window.

print qq{content-type: text/html\n\n};
print qq{<script type="text/javascript">window.open('$log_url')</script>\n};
}


( Be careful of endless redirect / new window loops ).

Chris


(This post was edited by Zhris on Mar 23, 2013, 8:52 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on Mar 23, 2013, 8:46 PM
Post edited by Zhris (Enthusiast) on Mar 23, 2013, 8:48 PM
Post edited by Zhris (Enthusiast) on Mar 23, 2013, 8:50 PM
Post edited by Zhris (Enthusiast) on Mar 23, 2013, 8:51 PM
Post edited by Zhris (Enthusiast) on Mar 23, 2013, 8:52 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives