Menu
i understand the basic concepts of javascript, not going to say im a master… and i would like to know how to achieve the following goal:
Trigger: Dropdown Menu, Select
Effect: selecting one of the options would change the source code of EVERY image on the page to a differant specified source, as well as move a few layers into slightly differant positions.. BUT, these items are in differant frames…. i understand this is going to be a rather complex code.. but i need it done.. and im not sure how this would work
<i>
</i>function change_image(){
parent.window.document.getElementById("IMG_ID").src="blah.gif"
}
<i>
</i>//flops an image in the main frame
[color=royalblue]top.frames['main'].document.getElementById("someImageId").src="Postbox.gif"[/color]
//flops an image in the top frame
[color=royalblue]top.document.getElementById("someImageId").src="Postbox.gif"[/color]
//flops an image in the left frame
[color=royalblue]top.frames['left'].document.getElementById("someImageId").src="Postbox.gif"[/color]
cool, and its red post box, meaning it will have a redish theme to it rather than black, and are those files supose to be .htm.txt? im asuming you wanted them as .htm only lol,
[/QUOTE]
and why is the "Top_files" now listen on all of my images?, i can change the URLs i was just wondering why.
[/QUOTE]
and hypotheticly, if i wanted the selcetor arguement to effect a large number of images, such as.. all of them, could you give me something of a 'skeliton code' to work with? :rolleyes:
[/QUOTE]
the code does not function just yet, and i was testing it with a differant image as redpostbox isnt ready yet, is there a purpose to haveing Top_files folder?
[/QUOTE]
do you need me to move all my top images in there for the code to work? becuase it isnt functioning :/
[/QUOTE]
i realy hate to be asking this much of you but my clan members are growing impatient with my lack of progress, this is an ongoing project for me, later i will need a VERY LARGE javascript code to quite literaly change the entire site, from text color, to table bordercolors, to image sorces and sizes, yes, even frame sizes... right now im just trieng to learn so i can do this myself, until then.. im going to have to employ you as a temporary sub-admin.. your earnings will total; $0 lol, but youll get displayed on the site as helping out, and get to know that you helped make my site even cooler than it already is ?[/QUOTE]
<i>
</i>function swapImageTheme(){
if(arguments[0]==0){
var topImages=top.frames['main'].document.getElementsByTagName("IMG")
for(var i=0;i<topImages.length;i++)
[color=red]if(topImages[i].imgClassId==0)[/color]
topImages[i].src="http://img.photobucket.com/albums/v50/Aredon/PostBox.gif"
}
...
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<STYLE type="text/css">
<!--
BODY
{
scrollbar-base-color: #CCCC00;
scrollbar-arrow-color: #ffff00;
scrollbar-face-color: #cc9900;
scrollbar-track-color: #996600;
scrollbar-shadow-color: #CC9933;
scrollbar-highlight-color: #FFFF00;
scrollbar-dark-shadow-color: #996600;
scrollbar-3d-light-color: #FFFF00;
BACKGROUND-COLOR: #000000
}
-->
</STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
</head>
<i>
</i><style type="text/css">
body {
scrollbar-base-color: #CCCC00;
scrollbar-arrow-color: #ffff00;
scrollbar-face-color: #cc9900;
scrollbar-track-color: #996600;
scrollbar-shadow-color: #CC9933;
scrollbar-highlight-color: #FFFF00;
scrollbar-[color=red]darkshadow[/color]-color: #996600;
scrollbar-[color=red]3dlight[/color]-color: #FFFF00;
background-color: #000000
}
</style>
TRY:
<i>
</i><style type="text/css">
body {
scrollbar-base-color: #CCCC00;
scrollbar-arrow-color: #ffff00;
scrollbar-face-color: #cc9900;
scrollbar-track-color: #996600;
scrollbar-shadow-color: #CC9933;
scrollbar-highlight-color: #FFFF00;
scrollbar-[color=red]darkshadow[/color]-color: #996600;
scrollbar-[color=red]3dlight[/color]-color: #FFFF00;
background-color: #000000
}
</style>
BTW: CAPS and lowercase don't make a difference in CSS[/QUOTE]
<i>
</i><style type="text/css">
body {
scrollbar-base-color: #CCCC00;
scrollbar-arrow-color: #ffff00;
scrollbar-face-color: #cc9900;
scrollbar-track-color: #996600;
scrollbar-shadow-color: #CC9933;
scrollbar-highlight-color: #FFFF00;
scrollbar-darkshadow-color: #996600;
scrollbar-3dlight-color: #FFFF00;
background-color: #000000
}
</style>
<i>
</i><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<i>
</i><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<i>
</i>function deleteAnImage(ImageId){
parent.frames["CF1"].document.getElementById(ImageId).style.display="none"
}
I also need a way to automate my post making...[/quote]You cannot automate your post making w/o help from a server-side program.
moving every layer 400px down at a time.. takes about 20min and.. thats not cool[/quote]
(we cannot use CGI or PHP or COLDFUSION for these effects.. freewebs rules >.<[/quote]
Eeeeh, Why are you [b]moving[/b] every layer down at all? I don't understand what your trying to do. Do you mean that when you swap the theme that all the new images in the news frame take forever to load and that's repulsive?
We could pre-load all the images including all of the images that are from unactive themes so when the theme swaps, it won't lag.
[/quote]
basicly im trieng to make it so that the layout of the site can be changed to differant "skins".[/QUOTE]
It's been a while since you gave me anything to do for you, can I help you do anything at the moment? Maybe even gather a collection of Diablo Avatars for ya? ?[/QUOTE]yes! diablo avatars would be amazing, thank you!.. as for moose... my problem is being fixed.. thanks tho
<a href="http://www.freewebs.com/clanhunter/news.htm" target="Main"><img src="http://img.photobucket.com/albums/v50/Aredon/Toss_Home.gif" alt="home"></a>
<i>
</i><base href="http://www.freewebs.com/clanhunter/">
<i>
</i><base href="http://www.aplustv.com/pics/">
<img src="Ultimater.bmp">
Hehe, you need to take out my <base href="http://www.freewebs.com/clanhunter/ "> line form the index.htm page ? (leave that tag in the other pages)
Making it easy for me to access all your links:
http://www.freewebs.com/clanhunter/testframe.htm
http://www.freewebs.com/clanhunter/test/top.htm
http://www.freewebs.com/clanhunter/test/left.htm
http://www.freewebs.com/clanhunter/test/expo.htm
http://www.freewebs.com/clanhunter/index.htm
http://www.freewebs.com/clanhunter/Top.htm
http://www.freewebs.com/clanhunter/left.htm
http://www.freewebs.com/clanhunter/news.htm [/QUOTE]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>..::Clan Hunter::.. Battle.net Clan home</title>
</head>
<frameset rows="145,*" cols="*" frameborder="NO" border="0" framespacing="0">
<frame src="http://www.freewebs.com/clanhunter/Top.htm" name="top" target="left"scrolling="NO" noresize>
<frameset cols="223,*" frameborder="NO" border="0" framespacing="0">
<frame src="http://www.freewebs.com/clanhunter/left.htm" name="left" target="main" scrolling="NO" noresize>
<frame src="http://www.freewebs.com/clanhunter/news.htm" name="main" target="_self">
</frameset>
</frameset>
<noframes><body><p>dude your browser sucks and you are unable to view this site.. :/
a non-frame version of this site is under consideration</body></noframes>
</html>
http://www.aplustv.com/public_stuff/submit_splash.php
?
page=theme1.htm
&
goto=http://www.freewebs.com/clanhunter
http://www.freewebs.com/clanhunter/theme1.htm
0.1.9 — BETA 5.18