Putting Cookie Name/Value in as HTML Attribute value.
Hello : )
Is it possible to put a cookie value in
as an HTML Attribute Value : ? )
Example:
(font size="GetCookie("size"))
......blah..... 8 o )__
(/font)
so visitor can control an attribute that
Javascript cannot control yet with its
own script language : ? )
Please, respond: )
thank you : )
Vincent Puglia posted this at 01:36 — 12th March 2000.
They have: 634 posts
Joined: Dec 1999
Hi,
Never tried it, but. it might work if the cookie is read before the text is displayed.
To make certain: document.write() the text. Sort of:
myFontSize = GetCookie(size);
document.write("<font><font size = '" + size + ....blah blah....");
Try it; can't hurt.
Vinny
------------------
GrassBlade: cut&paste javascript
Where the world once stood
the blades of grass cut me still
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.