Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

dev7
Guest
Well I've never had a use for cookies, so I don't really know how to create them.

Well can somebody help me? This is an example of a code I am trying to make, and I need it to make it so the banner saves as it is selected.


<script type='text/javascript'>
var td = document.getElementsByTagName('td')
function bannerchanger(n)
{
td[1].getElementsByTagName('font')[0].innerHTML = "<img src='http://img167.imageshack.us/img167/9067/bannercyanmw6.gif'>";
}
document.write('<a onclick="bannerchanger()">Change It</a>')
</script>

Anyone help? And if somebody would be as kind as to help me, I would also like to learn how to write the cookie and get to know what the coding part of it really means. Thanks.


Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
Ah, the joys of cookies...


i'm not too good with js cookies, but php cookies yes. if its any similar i should be able to figure it out i'm sure the more advanced js coders will help

here's a link that might be of some help


www.w3schools.com/js/js_cookies.asp


dev7
Guest
I'm not that good at learning from tutorials.. Can someone like post the code I posted with the cookie already in it, I'll have a much easier time learning from that.

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
You can use Chris's code in the open-source section. That's what I use when I need to use js cookies.


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

dev7
Guest
Does anyone listen? I said:
I'm not that good at learning from tutorials.. Can someone like post the code I posted with the cookie already in it, I'll have a much easier time learning from that.


dev7
Guest
Sorry for the double post, but hp.mad so kindly personally helped/walked me through with it, so thanks hp.mad and you two who tried to help. :D

newBookmarkLockedFalling