Results 1 to 16 of 16
  1. #1
    Join Date
    Oct 2001
    Posts
    348

    Unhappy I need help desperatly from you smart web designers

    [kiss_ass]I have a problem, so I figured I would ask the smartest people on the net.....the WHT members![/kiss_ass]

    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. Thanks, any help is appreciated!

  2. #2
    Join Date
    Aug 2001
    Location
    Canada
    Posts
    1,598
    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..

  3. #3
    Join Date
    Aug 2001
    Location
    Canada
    Posts
    1,598
    I found this which may be of some use: http://www.bravenet.com/reviews/frames/index.php ?

  4. #4
    Join Date
    Oct 2001
    Posts
    348
    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.

  5. #5
    This should work:

    <a href="http://www.******.com" target="_top">http://www.*****.com</a>

    If not, contact me on aim/aol Gizmo7779

  6. #6
    Join Date
    Oct 2001
    Posts
    348
    Yea, that doesnt work either. I dont have aim/aol, but I have MSN. screamin96@hotmail.com Thanks for the help so far guys.

  7. #7
    You didn't name a frame "top" did you?

  8. #8
    Do you need frames?
    Colin

  9. #9
    Join Date
    Oct 2001
    Posts
    348
    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.

  10. #10
    Join Date
    Aug 2001
    Location
    Canada
    Posts
    1,598
    I suggest going to: http://www.htmlhelp.com and post in their BB.

  11. #11
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    You are sure you tried it this way:

    Code:
    <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 Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  12. #12
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    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.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  13. #13
    Join Date
    Oct 2001
    Posts
    348
    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.

  14. #14
    Join Date
    Oct 2001
    Posts
    348
    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.

  15. #15
    Change the frame name to something else besides _top or top, just some weird name. Then try it. Post your code up here please.

  16. #16
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    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.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •