Log In · Register

 
 
Closed TopicStart new topic
randomly select html code
F-Disk
post Dec 29 2005, 12:10 PM
Post #1


Newbie
*

Group: Member
Posts: 1
Joined: Dec 2005
Member No: 336,967



well i dont know if this is possible with html or java but what i want to achieve is something along this line

a random number or something is bpicked and lets say thats between 1-3

i want something like tyhis

Case 1
Uses html code in here
Case 2
Use html code in here
Case 3
use html in here

what im trying to achieve is have multiple themes on myspace and have them alternate randomly everytime someone visits my profile
 
technicolour
post Dec 29 2005, 12:33 PM
Post #2


show me a garden thats bursting to life
********

Group: Staff Alumni
Posts: 12,303
Joined: Mar 2005
Member No: 115,987



A theme switcher?

Idk if they have it for myspace but I know they do for normal ol' websites.
 
freeflow
post Dec 29 2005, 12:37 PM
Post #3


t-t-t-toyaaa
********

Group: Official Member
Posts: 19,821
Joined: Apr 2004
Member No: 11,270



On Myspace I don't think thats possible. Unless you are allowed to use php on myspace.
Plus you would have to host all your stylesheets and images somewhere else.
 
*mipadi*
post Dec 29 2005, 04:08 PM
Post #4





Guest






You probably can't do it on MySpace, but it's possible to do it on some other site which allows the use of PHP. It's fairly simple, in fact. You'd just have to put this code in your <head> section:
CODE
<?php
$select = rand(1,3);
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"style$select.css\"/>\n";
?>

Assuming your stylesheets where named "style1.css", "style2.css", and "style3.css".
 
*Programmer*
post Dec 29 2005, 04:37 PM
Post #5





Guest






^ damn solved it before i could say anything ! laugh.gif
 

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