in reply to Re: call javascript from perl
in thread call javascript from perl
Thank you all for your advise, I tried what olus said but I couldn't get it to execute my script command, what I ended up doing is a sort of redirect back to my original page which then calls my javascript to reload the data.
if($ENV{'HTTP_REFERER'}=~ m/results=results/i)
{
print "Location:".$ENV{'HTTP_REFERER'}."\n\n";
}
else
{
print "Location:".$ENV{'HTTP_REFERER'}."?results=results\n\n";
}
this seems to be the easiest way to get the browser to call a javascript after you are done with a perl function. If someone wanted to use this to call a javascript function you just need to make an html page to call it and put the address where I put ENV{'HTTP_REFERER'}.