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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [terrykhatri531] How to pass variable value from perl to Javascript: Edit Log


Aug 10, 2014, 4:55 AM

Views: 19329
Re: [terrykhatri531] How to pass variable value from perl to Javascript

Hi Terry,

That isn't going to work.

The first thing you should print is the header. You have attempted to print html / javascript before the header. Also, you are using a redirect header, therefore anything you print after it will be ignored anyway (I think, I have never tried).

I provided an example of creating the cookies using CGI::Cookie, then setting them when you create the redirect header a few posts ago (post #21). Non http only cookies can be shared between Perl and javascript. Try implementing this, post it you get stuck. If this isn't suitable for some reason then you'll have to change your application design i.e. remove the redirect, or set the cookies in

Also don't worry about deleting the cookie, when you set the cookie it will create if it doesn't exist or update the existing.


(This post was edited by Zhris on Aug 10, 2014, 4:58 AM)

Edit Log:
Post edited by Zhris (Enthusiast) on Aug 10, 2014, 4:58 AM

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

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