SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot lightwithoutheat's Avatar
    Join Date
    Feb 2002
    Location
    Washington DC
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem w/ JS; inserting a page into frameset

    A friend of mine is having a problem with this Javascript in the first section as noted below. Apparently it inserts a page into a frameset. Now, I am no expert at Javascript, but thought maybe you could find something wrong with it. It ends in an error (maybe not compatible w/ IE?). I would be very grateful if anyone could help.

    Thanks very much.

    <head>
    <!-- IT'S THIS ONE CAUSING THE PROBLEM A.F.A.I.K.! :-->

    <script language="JavaScript"><!--
    if (parent.location.href == self.location.href)
    window.location.href = 'http://mathaba.net/MNN/www.freesudan.com/x.htm?'+ self.location.href.substring(0);
    // -->
    </script>

    <!-- THE ABOVE ONE CAUSING THE PROBLEM! :-->
    <META NAME="robots" CONTENT="index, follow">
    <title>Free Sudan</title>
    <link href=basic.css rel=stylesheet type=text/css>
    <base target="_blank">
    <script language="JavaScript"><!--
    function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}MM_reloadPage(true);//-->
    // -->
    </script>
    <script language="javascript"><!--
    function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
    src.style.cursor = 'default';
    src.bgColor = clrOver;
    }
    }
    function mOut(src,clrIn) {
    if (!src.contains(event.toElement)) {
    src.style.cursor = 'default';
    src.bgColor = clrIn;
    }
    }
    // -->
    </script>
    <script>
    <!--
    function land(ref,target){lowtarget=target.toLowerCase();if(lowtarget=="_self"){window.location=loc;}else{if(lowtarget=="_top"){top.location=loc;}else{if(lowtarget=="_blank"){window.open(loc);}else{if(lowtarget=="_parent"){parent.location=loc;}else{parent.frames[target].location=loc;};}}}}function jump(menu){ref=menu.choice.options[menu.choice.selectedIndex].value;splitc=ref.lastIndexOf("*");target="";if(splitc!=-1){loc=ref.substring(0,splitc);target=ref.substring(splitc+1,1000);}else{loc=ref;target="_self";};if(ref!=""){land(loc,target);}}
    function MM_displayStatusMsg(msgStr) { //v1.0
    status=msgStr;
    document.MM_returnValue = true;
    }
    // -->
    </script>
    </HEAD>
    <BODY bgColor=#e0e0e0 topmargin=3 onLoad="MM_displayStatusMsg('FreeSudan.Com');return document.MM_returnValue">
    <p>
    <script language="JavaScript"><!--
    function doClock() {
    window.setTimeout( "doClock()", 1000 );
    today = new Date();
    self.status = today.toString();
    }
    doClock()
    // -->
    </script>

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want help, you should make it as easy as possible for someone to help you:

    1) Post code with proper indenting using [ code] [/ code] tags.
    2) Post the error message
    3) Put a comment in red on the line of the code where the error appears.
    4) Don't post Dreamweaver code--most people won't even look at it because it is such a mess


Bookmarks

Posting Permissions

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