Loading ...
Sorry, an error occurred while loading the content.

help!

Expand Messages
  • Ron Woodall
    Hi All: Sorry for this intrusion but I m getting despirate. I need to figure out how to stop a script once it has started. ======== start of script ==========
    Message 1 of 4 , Oct 1, 2002
    • 0 Attachment
      Hi All:

      Sorry for this intrusion but I'm getting despirate.

      I need to figure out how to stop a script once it has started.

      ======== start of script ==========
      <SCRIPT LANGUAGE="JavaScript"><!--
      var loadplayer = true;
      var increment = 0;

      function initialize()
      { COUNT=window.setTimeout("counter();", 10000);}

      function counter() {
      var cycle = top.masthead.ads;
      increment++;
      if (cycle == false) {alert("ads are blocked");

      //this is the point where I need to stop it. Note the "return". This isn't
      doing what I expected. I'm looking for something like Perl's "die".


      return;}
      if (increment == 2 ) {banner(); popunder();}
      if (increment == 5 ) {invue(); popover();}
      if (increment == 6 ) {banner();}
      if (increment == 10 ) {invue();}
      COUNT=window.setTimeout("counter();", 10000);
      }

      function banner() {top.masthead.location.reload(true);}

      function popunder() {window.status="this is popunder start";}

      function invue() {
      if (increment == 10) {increment = 0;}
      window.status="this is invue start";}

      function popover() {window.status="this is popover start";}

      function end() {window.status="end of script";return;}
      // -->
      </SCRIPT>
      </head>
      <frameset rows="94,*" border="0" onload="initialize();">
      <frame src="0mh-fy.htm" name="masthead" border="0">
      <frame src="0bottom.htm" name="bottom" border="0">
      </frameset>
      ============ end of script =============

      Thanks for the help.

      Ron



      ---------------------------------------
      Ron Woodall
      nor@...

      The Compendium of HTML Elements
      "your essential web publishing resource"

      - available at/disponible à:
      http://au.htmlcompendium.org/index.htm (Australia)
      http://www.htmlcompendium.org/index.htm (Europe and North America)
    • Don Passenger
      not sure I am fully following your issue Ron If adds are blocked, then abort the script? If so one way is to put the remainder of the script in a if statement:
      Message 2 of 4 , Oct 1, 2002
      • 0 Attachment
        not sure I am fully following your issue Ron
        If adds are blocked, then abort the script?

        If so one way is to put the remainder of the script in a if statement:
        if (cycle != false) {
        rest of script
        }

        or because the alert is cycle == false, put the balance in an else ...

        }
        else
        {
        rest of script
        }

        Let me know if I missed the point Ron.
        Don
        ----- Original Message -----
        From: "Ron Woodall" <nor@...>
        To: <ntb-html@yahoogroups.com>
        Sent: Tuesday, October 01, 2002 2:08 PM
        Subject: [NH] help!


        > Hi All:
        >
        > Sorry for this intrusion but I'm getting despirate.
        >
        > I need to figure out how to stop a script once it has started.
        >
        > ======== start of script ==========
        > <SCRIPT LANGUAGE="JavaScript"><!--
        > var loadplayer = true;
        > var increment = 0;
        >
        > function initialize()
        > { COUNT=window.setTimeout("counter();", 10000);}
        >
        > function counter() {
        > var cycle = top.masthead.ads;
        > increment++;
        > if (cycle == false) {alert("ads are blocked");
        >
        > //this is the point where I need to stop it. Note the "return". This isn't
        > doing what I expected. I'm looking for something like Perl's "die".
        >
        >
        > return;}
        > if (increment == 2 ) {banner(); popunder();}
        > if (increment == 5 ) {invue(); popover();}
        > if (increment == 6 ) {banner();}
        > if (increment == 10 ) {invue();}
        > COUNT=window.setTimeout("counter();", 10000);
        > }
        >
        > function banner() {top.masthead.location.reload(true);}
        >
        > function popunder() {window.status="this is popunder start";}
        >
        > function invue() {
        > if (increment == 10) {increment = 0;}
        > window.status="this is invue start";}
        >
        > function popover() {window.status="this is popover start";}
        >
        > function end() {window.status="end of script";return;}
        > // -->
        > </SCRIPT>
        > </head>
        > <frameset rows="94,*" border="0" onload="initialize();">
        > <frame src="0mh-fy.htm" name="masthead" border="0">
        > <frame src="0bottom.htm" name="bottom" border="0">
        > </frameset>
        > ============ end of script =============
        >
        > Thanks for the help.
        >
        > Ron
        >
        >
        >
        > ---------------------------------------
        > Ron Woodall
        > nor@...
        >
        > The Compendium of HTML Elements
        > "your essential web publishing resource"
        >
        > - available at/disponible à:
        > http://au.htmlcompendium.org/index.htm (Australia)
        > http://www.htmlcompendium.org/index.htm (Europe and North America)
        >
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
      • Jeff Burrows
        clearTimeout( COUNT ) will stop that timer object ... From: Ron Woodall [mailto:nor@htmlcompendium.org] Sent: Tuesday, October 01, 2002 2:09 PM To:
        Message 3 of 4 , Oct 1, 2002
        • 0 Attachment
          clearTimeout("COUNT")
          will stop that timer object

          -----Original Message-----
          From: Ron Woodall [mailto:nor@...]
          Sent: Tuesday, October 01, 2002 2:09 PM
          To: ntb-html@yahoogroups.com
          Subject: [NH] help!


          Hi All:

          Sorry for this intrusion but I'm getting despirate.

          I need to figure out how to stop a script once it has started.

          ======== start of script ==========
          <SCRIPT LANGUAGE="JavaScript"><!--
          var loadplayer = true;
          var increment = 0;

          function initialize()
          { COUNT=window.setTimeout("counter();", 10000);}

          function counter() {
          var cycle = top.masthead.ads;
          increment++;
          if (cycle == false) {alert("ads are blocked");

          //this is the point where I need to stop it. Note the "return". This isn't
          doing what I expected. I'm looking for something like Perl's "die".


          return;}
          if (increment == 2 ) {banner(); popunder();}
          if (increment == 5 ) {invue(); popover();}
          if (increment == 6 ) {banner();}
          if (increment == 10 ) {invue();}
          COUNT=window.setTimeout("counter();", 10000);
          }

          function banner() {top.masthead.location.reload(true);}

          function popunder() {window.status="this is popunder start";}

          function invue() {
          if (increment == 10) {increment = 0;}
          window.status="this is invue start";}

          function popover() {window.status="this is popover start";}

          function end() {window.status="end of script";return;}
          // -->
          </SCRIPT>
          </head>
          <frameset rows="94,*" border="0" onload="initialize();">
          <frame src="0mh-fy.htm" name="masthead" border="0">
          <frame src="0bottom.htm" name="bottom" border="0">
          </frameset>
          ============ end of script =============

          Thanks for the help.

          Ron



          ---------------------------------------
          Ron Woodall
          nor@...

          The Compendium of HTML Elements
          "your essential web publishing resource"

          - available at/disponible à:
          http://au.htmlcompendium.org/index.htm (Australia)
          http://www.htmlcompendium.org/index.htm (Europe and North America)





          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        Your message has been successfully submitted and would be delivered to recipients shortly.