Image rotation with javascript help needed
15 posts
• Page 2 of 2 • 1, 2
jbullard wrote:Sorry man, I have been so busy lately with other programming stuff. But, I would suggest using PHP as it is a much better solution for what you want. I will see if I can't create a script for you. May take a week but I will try and get something for you. At least something to start with.
Yeah .. right after I offered my help here, I ran into the same with general work (the sig work I posted elsewhere is actually a bit old itself, it just took that long to get around to posting it, and I haven't touched it since)
I'll take a glance at it again, now, I think ...
- poisonbl
- Posts: 432
- Joined: Mon Nov 15, 2004 10:02 pm
- Location: WVU -- Morgantown, WV. -- USA (TZ: -5 hrs GMT, -4 DST)
okay so i have been looking and looking and have come up with this...
now i just need to remove the username parts and set it to use the server time and not client time...
- Code: Select all
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return null
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate)
}
function checkCookie()
{
username=getCookie('username')
if (username!=null)
{alert('Welcome again '+username+'!')}
else
{
username=prompt('Please enter your name:',"")
if (username!=null && username!="")
{
setCookie('username',username,7)
}
}
}
now i just need to remove the username parts and set it to use the server time and not client time...
15 posts
• Page 2 of 2 • 1, 2
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 2 guests