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 9, 2014, 8:54 PM

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

<TITLE> Cookie Issue </TITLE>
<link type="text/css" rel="stylesheet" href="dreamcodes.css" />
<link type="text/css" rel="stylesheet" href="dreamtooltips.css" />
<script type="text/javascript" src="dreamtooltips.js"></script>
<script type="text/javascript" src="dreamcodes.js"></script>
<script type="text/javascript" src="jquery.min.js"></script>
<script src=""></script>
<script src="jquery.cookie.js"></script>
<div class="dtcodes_main">
<script type="text/javascript" src="dreammenu.js"></script>
Navigation menu requires Javascript to be enabled.

<h1>Script dreammenu.js is the one where I am trying to read and assign user value from cookie</h1>

<script type="text/javascript">
//$.cookie('user', 'Terry', { path:'/', expires:1 });
$(document).ready(function() {


this is the index.html page

<a href="" title="" id="user">\'+ user+ \'</a>

this is the new link in the dreammenu.js, i added the id so jquery will update the link text to the cookie.

(This post was edited by wickedxter on Aug 9, 2014, 9:00 PM)

Edit Log:
Post edited by wickedxter (User) on Aug 9, 2014, 9:00 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