S
screechyboy
OKay so im new to Javascript Cookies....
I am able to set and return cookie values but i know want to create an
if statement!
One of my cookies is called "color" and i wish to write a script that
displays a certain graphic if "Color" equals "White" for example.
The code i have so far is...
<script type="text/javascript">
color=getCookie('color')
if (color="White")
{
alert('Color = '+color+'!')
}
</script>
The alert appears when the page loads but ignores the IF statement so
just displays the value of "color" regardless of wether its value is
"White".
Im stuck and google searching is getting me knowhere, can this be
done?
Your help is greaty appreciated!
I am able to set and return cookie values but i know want to create an
if statement!
One of my cookies is called "color" and i wish to write a script that
displays a certain graphic if "Color" equals "White" for example.
The code i have so far is...
<script type="text/javascript">
color=getCookie('color')
if (color="White")
{
alert('Color = '+color+'!')
}
</script>
The alert appears when the page loads but ignores the IF statement so
just displays the value of "color" regardless of wether its value is
"White".
Im stuck and google searching is getting me knowhere, can this be
done?
Your help is greaty appreciated!