[Javascript] HTTP_GET_VARS on JavaScript.
Prabu Subroto
prabusubroto at yahoo.com
Tue Aug 26 08:21:00 CDT 2003
So, Can I do like this to put a variable into the
cookie :
window.document.cookie="my_cookie='50'"
And then my flash file will read this "my_cookie" this
cookie with "to_number=getcookie" and do
"
gotoAndPlay(to_number)
"
Please tell me, murugesan.
--- murugesan <murugesan at hotpop.com> wrote:
> if(getCookie("uname") != null)
> {
> document.forms[0].visnme.value=getCookie("uname");
> }
> Use get cookie function ..
> then in the <input....
> show
> <input .. value=<?php echo $uname?>>
>
>
> -murugesan
>
> ----- Original Message -----
> From: "Prabu Subroto" <prabusubroto at yahoo.com>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Tuesday, August 26, 2003 5:42 PM
> Subject: Re: [Javascript] HTTP_GET_VARS on
> JavaScript.
>
>
> > Hallo Murugesan, thank you very much for your
> > respond...
> >
> > I am still wondering how to read the value of the
> > variable in the cookie with LoadVars of the
> > ActionScript. Do you know that? Could you give a
> clear
> > syntax as the sample?
> >
> > Please....
> >
> > Thank you very much in advance.
> > --- murugesan <murugesan at hotpop.com> wrote:
> > > <input type=hidden name=cookie>
> > >
> > > functiion submitform()
> > > {
> > > name=document.forms[0].uname.value;
> > > now=new Date();
> > > setCookie("visname",name, now);
> > > }
> > >
> > >
> > > function setCookie(name, value, expires, path,
> > > domain, secure)
> > > {
> > > var curCookie = name + "=" + escape(value) +
> > > ((expires) ? "; expires=" +
> > > expires.toGMTString() : "") +
> > > ((path) ? "; path=" + path : "") +
> > > ((domain) ? "; domain=" + domain : "") +
> > > ((secure) ? "; secure" : "");
> > > document.cookie = curCookie;
> > > }
> > > function getCookie(name)
> > > {
> > > var dc = document.cookie;
> > > var prefix = name + "=";
> > > var begin = dc.indexOf("; " + prefix);
> > > if (begin == -1)
> > > {
> > > begin = dc.indexOf(prefix);
> > > if (begin != 0)
> > > return null;
> > > }
> > > else
> > > begin += 2;
> > > var end = document.cookie.indexOf(";",
> begin);
> > > if (end == -1)
> > > end = dc.length;
> > > return unescape(dc.substring(begin +
> > > prefix.length, end));
> > > }
> > >
> > >
> > > if(getCookie("uname!= null)
> > > {
> > > var cook;
> > >
> document.forms[0].visnme.value=getCookie("uname");
> > > if(document.forms[0].cookie.value=='on') |
> > > document.forms[0].cookie.value='off';
> |
> > > else
> > > |
> > > setvalueof cookie
> > > document.forms[0].cookie.value='on'; |
> > > }
> > >
> > > <input type=checkbox onclick=set value of
> cookie>
> > >
> > > -murugesan
> > > ----- Original Message -----
> > > From: "Prabu Subroto" <prabusubroto at yahoo.com>
> > > To: "[JavaScript List]" <javascript at LaTech.edu>
> > > Sent: Tuesday, August 26, 2003 4:42 PM
> > > Subject: Re: [Javascript] HTTP_GET_VARS on
> > > JavaScript.
> > >
> > >
> > > > Dear my friend, Chris...
> > > >
> > > > I tried to understand your advice but I still
> > > loose my
> > > > self.
> > > >
> > > > How can I put the cookies? and How can I load
> the
> > > > value of the variable in the cookie?
> > > >
> > > > Could you give me a clear syntax as an example
> of
> > > > putting the cookie in JavaScript or PHP and to
> > > read
> > > > the cookie with LoadVars?
> > > >
> > > > Please tell me my friends. I am really stuck.
> > > >
> > > > Thank you very much in advance.
> > > > --- Chris Tifer <christ at saeweb.com> wrote:
> > > > > Yes, it's possible. My method to fix this
> would
> > > be
> > > > > to use Cookies and have
> > > > > the first thing Flash does is check this
> cookie
> > > by
> > > > > using a loadVariables
> > > > > command which simply checks the value of the
> > > cookie
> > > > > and outputs something
> > > > > like:
> > > > >
> > > > > blHasCookie=1 (or blHasCookie=0)
> > > > >
> > > > > Then judging by that variable in Flash, you
> > > either
> > > > > tell it to play from the
> > > > > opening sequence or the other frame (I
> recommend
> > > > > using Labels instead of
> > > > > frame numbers. Much better...
> > > > >
> > > > > I'm sure you could us FSCommand to talk with
> > > > > JavaScript and issue a command
> > > > > directly to Flash based off the value of the
> > > cookie
> > > > > keeping you from making
> > > > > another call to the server, but
> loadVariables is
> > > > > easier to me.
> > > > >
> > > > > Does that make sense or did I lose you?
> > > > >
> > > > > Chris Tifer
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Prabu Subroto"
> <prabusubroto at yahoo.com>
> > > > > To: "[JavaScript List]"
> <javascript at LaTech.edu>
> > > > > Sent: Friday, August 22, 2003 9:58 AM
> > > > > Subject: Re: [Javascript] HTTP_GET_VARS on
> > > > > JavaScript.
> > > > >
> > > > >
> > > > > > Dear my friend, Christ....
> > > > > >
> > > > > > I am very new in Flash and Macromedia
> > > web-pack.
> > > > > >
> > > > > > I am making a homepage
> > > > > >
> > > > >
> > > >
> > >
> >
>
(http://www.i-am-e-system.de/www.lam-ag.de/index.html),
> > > > > > so far this is good enough already for me
> but
> > > my
> > > > > boss
> > > > > > has a difficult command for me. He wants
> that
> > > the
> > > > > > visitors can see and read clearly all of
> the
> > > > > document
> > > > > > if they click on "Vergrößern" (means :
> > > enlarge)
> > > > > > button. For example, the visitors click
> > > > > > "Zeichnungsschein Formular" than they will
> > > find a
> > > > > > small document with fore animation and two
> > > > > buttons.
> > > > > > One button is for "Vergrößern" (enlarge)
> and
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the Javascript
mailing list