Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: How do I send information to Javascript from perl?

by Parham (Friar)
on Jan 01, 2002 at 03:37 UTC ( #135455=note: print w/ replies, xml ) Need Help??


in reply to Re: How do I send information to Javascript from perl?
in thread How do I send information to Javascript from perl?

one approach would be to redirect to an html file with a query string after you've done all your processing in your perl such as:

$username = 'username'; print "Location: html.html?username=$username\n\n";
from there, you can simply grab the variable on the html using this:
<script language="JavaScript"><!-- if (location.search.length > 0) eval('var ' + location.search.substring(1)); //--></script>


Comment on Re: Re: How do I send information to Javascript from perl?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://135455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-07-01 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (17 votes), past polls