PDA

View Full Version : ** HTML color change **



The_Vulcan
October 17th, 2003, 02:54 AM
I have tried to use the script from this thread but have been unable to get it to work.
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12677&highlight=change+html+color

I placed this between the <head> tags


<SCRIPT LANGUAGE="JavaScript">
<!--
function changeColor(color){
document.bgColor = color;
}
-->
</SCRIPT>


I placed this on a buttton

on (release){
getURL("about :changeColor('#E6E6E6')");
}



when I click on the button it changes pages; the address it shows is......

C:\Documents and Settings\admin\Desktop\about :changeColor('#E6E6E6')


It must be something simple that I dont know about, could someone please tell me what I may have done wrong ?

.soulty
October 17th, 2003, 03:13 AM
have you tried it online? maybe changing the



on (release){
getURL("about :changeColor('#E6E6E6')");
}to a absolute address


on (release){
getURL("http://www.yourwebsite/about.html :changeColor('#E6E6E6')");
}


hope that helps.

The_Vulcan
October 17th, 2003, 03:17 AM
Thanks Soulty

I have now tried it online, but I didnt work. it changed pages to this

http://home.iprimus.com.au/c_schultz/testing.html%20:changeColor('

.soulty
October 17th, 2003, 03:28 AM
whats the address you put in the code?

The_Vulcan
October 17th, 2003, 03:39 AM
I tried

http://home.iprimus.com.au/c_schultz/testing.html

and

http://home.iprimus.com.au/c_schultz/about.html

.soulty
October 17th, 2003, 03:46 AM
where is the www?

:: also depending on how you saved your about html page it may be .html or .htm

The_Vulcan
October 17th, 2003, 03:56 AM
there is no www in the address...

the page I am refering to is testing.html

I thought that "about" may have been special feature refering to the page the flash movie was in.....

.soulty
October 17th, 2003, 04:23 AM
not sure about that, sorry dude, and the link you have in your first post, doesnt work any more.

The_Vulcan
October 17th, 2003, 04:31 AM
Thanks for your help Soulty....

I have fixed the link.

.soulty
October 17th, 2003, 04:40 AM
ok, the code in flash dosent need to have http:// ........

did you make sure that your html page and swf files were in the same folder?

The_Vulcan
October 17th, 2003, 04:53 AM
Yeah I now have it working.... I still have no idea why the other way wouldn't work.....

I used

http://www.actionscripts.org

/tutorials/intermediate/Change_the_BG_of_the_HTML_Page/index.shtml


thanks for you help again...

.soulty
October 17th, 2003, 10:51 AM
no probs, dont know if i helped much :P

good find on actionscipt.

:)