Putting Cookie Name/Value in as HTML Attribute value.

They have: 5,633 posts

Joined: Jan 1970

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: )

[email protected]

thank you : )

Vincent Puglia's picture

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.