|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
O.k. --I have a scroller script pasted below--
--I have highligted the line that works in green-- --I have bolded the line below, the line that works, with the cookie variable that I want to put in there-- **I have passed a variable (w/in asp code) to a cookie. Does anyone know Howdo I get that cookie to be used in this script? *Currently this doesn't work --I've tried several iterations of this and it just wont' work... HELP!! Mymessage is the variable <div align="justify"> <script language="JavaScript1.2"> varmessage = mymessage var ajscroll_1 = new AJScroller(); ajscroll_1.name = 'ajscroll_1'; ajscroll_1.type = 0; ajscroll_1.width = 85; ajscroll_1.height = 50; ajscroll_1.scrollspeed = 10; ajscroll_1.pausedelay = 500; ajscroll_1.pausemouseover = true; ajscroll_1.itemwidth = 85; //ajscroll_1.add('This is my message'); ajscroll_1.add('Request.Cookies.Item("myMessage")'); ajscroll_1.display(); onload = function(){ajscroll_1.start();}; onresize = function(){ajscroll_1.load()}; </script> |
|
#2
|
||||
|
||||
|
ASP cookies are server side - Javascript cookies are client side - they are completely separate from each other, as they have different purposes.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Getting a cookie to display in javascript... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|