Chatbox

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 change background image and save on 14/4/2012, 10:22 pm

grimofdoom

avatar

Member
I need a script that changes background image and save. though click the background pic preview to change/save.

View user profile

2 Re: change background image and save on 15/4/2012, 11:07 am

LGforum

avatar

Moderator
You can save things for users using cookies. Presumably your wanting to allow users to change the background?

View user profile

3 Re: change background image and save on 15/4/2012, 12:01 pm

grimofdoom

avatar

Member
yes.and i have 0% of javascript knowledge so i dont know how

View user profile

4 Re: change background image and save on 15/4/2012, 5:00 pm

LGforum

avatar

Moderator
Two good cookie function:

Code:

function getcookie(name) {
    cname = name + '=';
    cpos = document.cookie.indexOf(cname);
    if (cpos != -1) {
        cstart = cpos + cname.length;
        cend = document.cookie.indexOf(';',cstart);
        return unescape(document.cookie.substring(cstart,cend));
    }
    else {return null;}
}

function setcookie(name,value,sticky) {
    expires = '';
    if (sticky) {expires = ' expires=Wed, 1 Jan 2020 00:00:00 GMT;';}
    document.cookie = name + "=" + value + '; path=/;' + expires;
}

You'll need to design the system how you want your users to change the background image.
- dropdown list?
- Button?
- Upload there own image?
etc...

View user profile

5 Re: change background image and save on 15/4/2012, 5:20 pm

grimofdoom

avatar

Member
im thinking button(button is preview of pic),like the one in the tutorial on here but on click instead of onmouseover and save it.

View user profile

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum