change background image and save
Page 1 of 1 • Share
- grimofdoomMember
- Forum Posts : 106
Member Since : 2012-03-06
I need a script that changes background image and save. though click the background pic preview to change/save.
- LGforumModerator
- Forum Posts : 77
Member Since : 2011-11-12
You can save things for users using cookies. Presumably your wanting to allow users to change the background?
- grimofdoomMember
- Forum Posts : 106
Member Since : 2012-03-06
yes.and i have 0% of javascript knowledge so i dont know how
- LGforumModerator
- Forum Posts : 77
Member Since : 2011-11-12
Two good cookie function:
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...
- 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...
- grimofdoomMember
- Forum Posts : 106
Member Since : 2012-03-06
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.
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|