
|
View Full Version : I need help desperatly from you smart web designers
shibby 07-30-2002, 10:21 PM I have a problem, so I figured I would ask the smartest people on the net.....the WHT members!
Anyway, I have a wesbite. It is in frames. It has a top frame, a left frame, and a center frame. I have sponsors. I have 3 sponsors. I have 3 banners to rotate in the TOP frame. This is the rotation script I am using:
http://www.simplythebest.net/info/javascript55.html
Anyway, if you click on the banners, ONLY the top frame changes, so you see about 2" of my sponsor's webpage. I tried adjusting the script, by adding target=_"top" to the end of the URL, but it doesnt work. If someone can help me with this, I will name my first born after you. :D Thanks, any help is appreciated! :)
Synthetic 07-30-2002, 10:24 PM Could you possibly post the URL so I could get a better idea of the problem?
Edit: Nevermind, I experienced the same problem before. Let me try to remember..
Synthetic 07-30-2002, 10:29 PM I found this which may be of some use: http://www.bravenet.com/reviews/frames/index.php ?
shibby 07-30-2002, 10:38 PM Hmmm..thanks, but that doesn't really help. I know how to make links open in a specific frame, or a new window, but the problem is that in the rotation script, it just has the links like this:
"banner1.gif","http://www.sponsor1.com",
"banner2..gif","http://www.sponsor2.com",
"banner3.gif","http://www.sponsor3.com");
So ya see, adding the target tags does nothing. :(
OverSkilled 07-31-2002, 12:04 AM This should work:
<a href="http://www.******.com" target="_top">http://www.*****.com</a>
If not, contact me on aim/aol Gizmo7779
shibby 07-31-2002, 12:13 AM Yea, that doesnt work either. :( I dont have aim/aol, but I have MSN. screamin96@hotmail.com Thanks for the help so far guys.
OverSkilled 07-31-2002, 12:16 AM You didn't name a frame "top" did you?
Dogma 07-31-2002, 12:47 AM Do you need frames?
shibby 07-31-2002, 02:40 AM Actually I did name a frame "top", but in the code it is "_top". And I tried it with target=new also, and nothing happens.
And yea, I need frames. :(
Synthetic 07-31-2002, 02:44 AM I suggest going to: http://www.htmlhelp.com and post in their BB.
Ahmad 07-31-2002, 02:50 AM You are sure you tried it this way:
<script language="JavaScript">
// Copyright 1996, Infohiway, Inc. (http://www.infohiway.com)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
<!--
function adArray() {
for (i=0; i*2<adArray.arguments.length; i++) {
this[i] = new Object();
this[i].src = adArray.arguments[i*2];
this[i].href = adArray.arguments[i*2+1];
}
this.length = i;
}
function getAdNum() {
dat = new Date();
dat = (dat.getTime()+"").charAt(8);
if (dat.length == 1)
ad_num = dat%ads.length;
else
ad_num = 0;
return ad_num;
}
var ads = new adArray(
"images/banner1.gif","http://planmagic.com",
"images/banner2.gif","http://webquestpro.com",
"images/banner3.gif","http://simplythebest.net");
var ad_num = getAdNum();
document.write('<CENTER><TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0><TR><TD '
+'ALIGN=CENTER><FONT SIZE=2 FACE=Arial><B>SimplytheBest DHTML Scripts & JavaScripts is sponsored by: '
+'</FONT></TD><TR></TR><TD><A HREF="'+ads[ad_num].href+'" TARGET="_top"><IMG SRC="'+ads[ad_num].src+'" '
+'WIDTH="468" HEIGHT="60" BORDER=0 name=js_ad></A></TD></TR></TABLE></CENTER>');
link_num = document.links.length-1;
function rotateSponsor() {
if (document.images) {
ad_num = (ad_num+1)%ads.length;
document.js_ad.src = ads[ad_num].src;
document.links[link_num].href = ads[ad_num].href;
setTimeout("rotateSponsor()",5000);
}
}
setTimeout("rotateSponsor()",5000);
// -->
</script>
Ahmad 07-31-2002, 02:56 AM I've just tried it and it worked for me. Opened the link on top of all frames. I named my top frame "top" to make sure this is not the reason of the problem.
shibby 07-31-2002, 04:00 AM Ya know, I wasn't even doing it like that...I was adding the code at the end of the actual links! :lol: Thank you so much! I'll give it a try in the morning when I have time..thanks! :)
Guess my first born will be named Ahmad. :stickout
shibby 07-31-2002, 04:24 AM Actually I gave it a try, and it doesn't work at all. :( I copied the code just like you have it, and added my links and images. Its just blank on the page where the banner should be. :(
I thought for sure that was gonna work.
OverSkilled 07-31-2002, 04:53 AM Change the frame name to something else besides _top or top, just some weird name. Then try it. Post your code up here please.
Ahmad 07-31-2002, 08:49 AM Originally posted by shibby
Actually I gave it a try, and it doesn't work at all. :( I copied the code just like you have it, and added my links and images. Its just blank on the page where the banner should be. :(
I thought for sure that was gonna work.
Strange. It worked fine for me.
Can you give me a URL to the page with the real links?
I'm sure it's just a small problem somewhere.
|