Log In · Register

 
 
Closed TopicStart new topic
how to add script, background!!
rosedoll
post Apr 17 2006, 02:32 PM
Post #1


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



i have this script here:
<script language=javascript>
var pic=new Array(5)
pic[0]=""
pic[1]=""
pic[2]=""
pic[3]=""
pic[4]=""
pic[5]=""
pic[6]=""
pic[7]=""

var newdate=new Date()
var getpic=newdate.getSeconds()%pic.length
document.write('<STYLE>')
document.write('body{ background-image: url('+pic[getpic]+');')
document.write(' background-repeat: no-repeat; ')
document.write('background-attachment: fixed; ')
document.write('background-position: 50% 100% }')
document.write('</STYLE>')
</script>

Is to random your backgrounds right?``i want one or two of my background pics to repeat and stf`` what and where do i add the "background-repeat: repeat;" to?
thankyou for helping``
 
OneOfTheseDayz
post Apr 17 2006, 03:21 PM
Post #2


Ill get around to doing that....
*****

Group: Member
Posts: 518
Joined: Oct 2005
Member No: 275,913



If I am understanding your question right... You don't need to put a background-repeat: .... Just put in the same image twice in slots............
 
rosedoll
post Apr 17 2006, 03:53 PM
Post #3


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(drilotedahl @ Apr 17 2006, 1:21 PM) *
If I am understanding your question right... You don't need to put a background-repeat: .... Just put in the same image twice in slots............



amm..... what i meant is that, i have a few pictures that are needed to be repeated. and some others are not repeated. so for the repeating ones`` how to make them repeat?
 
talcumpowder
post Apr 17 2006, 05:59 PM
Post #4


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



CODE
document.write(' background-repeat: no-repeat; ')
Just take out the no-. Seems easy when you think about it, right?
 
rosedoll
post Apr 17 2006, 07:32 PM
Post #5


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(fishcake-y @ Apr 17 2006, 3:59 PM) *
CODE
document.write(' background-repeat: no-repeat; ')
Just take out the no-. Seems easy when you think about it, right?


i have this part though.... but then i want to put then in one or two of these ones here:

pic[0]=""
pic[1]=""
pic[2]=""
pic[3]=""
pic[4]=""

where do i add it?
 
OneOfTheseDayz
post Apr 17 2006, 08:48 PM
Post #6


Ill get around to doing that....
*****

Group: Member
Posts: 518
Joined: Oct 2005
Member No: 275,913



QUOTE(rosedoll @ Apr 17 2006, 7:32 PM) *
i have this part though.... but then i want to put then in one or two of these ones here:

pic[0]=""
pic[1]=""
pic[2]=""
pic[3]=""
pic[4]=""

where do i add it?


WOW you are confusing me..........

Maybe this?
CODE
pic[4]="YOURURLHERE"


You need to slow down you hardly make any sense... ( Then again I am a little slow) yawn.gif
 
rosedoll
post Apr 18 2006, 01:10 AM
Post #7


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(drilotedahl @ Apr 17 2006, 6:48 PM) *
WOW you are confusing me..........

Maybe this?
CODE
pic[4]="YOURURLHERE"


You need to slow down you hardly make any sense... ( Then again I am a little slow) yawn.gif



hm..... nope is not this one.... am*
i dont mean by the url.... i mean beside it...wut can i add in to repeat that picture.. but not all of the other pictures. i just want to put a little script thingy beside the ones i want to be repeated.
 
OneOfTheseDayz
post Apr 18 2006, 12:12 PM
Post #8


Ill get around to doing that....
*****

Group: Member
Posts: 518
Joined: Oct 2005
Member No: 275,913



put the script in twice??????
 
rosedoll
post Apr 18 2006, 07:27 PM
Post #9


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(drilotedahl @ Apr 18 2006, 10:12 AM) *
put the script in twice??????


=v=??"
 
talcumpowder
post Apr 18 2006, 11:57 PM
Post #10


You'll find me in your dreams.
*******

Group: Official Member
Posts: 8,536
Joined: Mar 2005
Member No: 114,010



Can't do that. It has to be all or none. Otherwise it'd take a lot more Javascript coding which I don't wanna go into because I'm not entirely sure it's possible. -shrug- It would be fairly complicated though.
 
rosedoll
post Apr 19 2006, 12:28 AM
Post #11


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



QUOTE(fishcake-y @ Apr 18 2006, 9:57 PM) *
Can't do that. It has to be all or none. Otherwise it'd take a lot more Javascript coding which I don't wanna go into because I'm not entirely sure it's possible. -shrug- It would be fairly complicated though.



haha alrights..... thankyou xDDDD~~
 
gelionie
post Apr 20 2006, 01:00 AM
Post #12


say maydayism.
*******

Group: Staff Alumni
Posts: 7,447
Joined: Jun 2004
Member No: 26,344



Try putting the repeating pics into MS Paint as the same size as the other non-repeating backgrounds. Then try the code again.
 
rosedoll
post Apr 30 2006, 04:09 PM
Post #13


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



haha alrights fankyyyou``
but i dont have ms paint and i dun noe how to use it tho ,,,,,, =v=
 
gelionie
post May 1 2006, 12:06 AM
Post #14


say maydayism.
*******

Group: Staff Alumni
Posts: 7,447
Joined: Jun 2004
Member No: 26,344



You should have the program Microsoft Paint, if you're using Windows. huh.gif
 
rosedoll
post May 1 2006, 09:05 PM
Post #15


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



microsoft paint? im using xp`` but how cum i dont have it here or i couldnt find it??
 
gelionie
post May 3 2006, 06:03 AM
Post #16


say maydayism.
*******

Group: Staff Alumni
Posts: 7,447
Joined: Jun 2004
Member No: 26,344



^ is your Windows in another language? If so, you might need to find for translated name instead.
 
rosedoll
post May 4 2006, 11:44 PM
Post #17


Senior Member
***

Group: Member
Posts: 78
Joined: Apr 2006
Member No: 391,072



hahaha noooo laa` its eng`` but it doesnt have microsoft paint..... only have the others
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: