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: Beginner:
Perl/Javascript combo question

 



darian
Deleted

Feb 10, 2000, 3:26 AM

Post #1 of 3 (499 views)
Perl/Javascript combo question Can't Post

Ok I need to be able to place a carriage return in some javascript that is placed inside my perl script. However when I use \n or \r the javascript does not work. Is there another way to force the carriage return without Perl interpretting it?


japhy
Enthusiast

Feb 10, 2000, 4:05 AM

Post #2 of 3 (499 views)
Re: Perl/Javascript combo question [In reply to] Can't Post

You have to escape the backslash:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


$name = "jeff";

print << "END OF JS";
function foo () {
document.write("Hello, $name\\n")
}
END OF JS
</pre><HR></BLOCKQUOTE>


darian
Deleted

Feb 10, 2000, 4:30 AM

Post #3 of 3 (499 views)
Re: Perl/Javascript combo question [In reply to] Can't Post

WOW ever have one of those days you know you should just walk away from your pc. I would but know that you answered all of my questions on each post japhy I have to stay here and work on them now. hehe Thanks.

 
 


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

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