A Digital Age Deserves A Digital Leader

Image rotation with javascript help needed

Postby c0ldfyr3 » Tue Jun 03, 2008 5:25 pm

awesome, sounds good to me... and thank you.

right now the images are just changing with each refresh and the owner is getting upset.. lol i told him to hold on to his panties... i think he is....lol.
Image
PRO Level 15
User avatar
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Postby poisonbl » Tue Jun 03, 2008 7:16 pm

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. :yesnod:


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 ...
Image
Image
PRO Level 10
User avatar
Posts: 432
Joined: Mon Nov 15, 2004 10:02 pm
Location: WVU -- Morgantown, WV. -- USA (TZ: -5 hrs GMT, -4 DST)

Postby c0ldfyr3 » Wed Jun 11, 2008 5:18 pm

any luck?
Image
PRO Level 15
User avatar
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Postby c0ldfyr3 » Wed Jun 18, 2008 8:25 am

okay so i have been looking and looking and have come up with this...

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...
Image
PRO Level 15
User avatar
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Postby c0ldfyr3 » Sun Jun 22, 2008 4:57 pm

no one?
Image
PRO Level 15
User avatar
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Previous

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests

cron
cron