callMsgBox2 undefined Firefox error console, works in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rwaller
    New Member
    • Mar 2007
    • 3

    callMsgBox2 undefined Firefox error console, works in IE

    Works fine in IE, but not in Firefox? Code below, thank you in advance....

    http://www.cnusd.k12.c a.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpave lgcy.html


    <SCRIPT LANGUAGE=vbscri pt>
    function callMsgBox2(str Msg)
    callMsgBox2 = msgBox(strMsg,4 ,"Leaving ERHS")
    end function
    </SCRIPT>

    <SCRIPT LANGUAGE=javasc ript>
    function callMsgBox1(str Msg){
    var retVal = callMsgBox2(str Msg);
    var response = retVal
    if (response == 6){
    window.location .href = 'http://www.bricksrus.c om/order/erhs/index.htm' }
    else {
    window.location .href = 'http://www.cnusd.k12.c a.us/roosevelt%2Dhs/' }
    }
    callMsgBox1('Do you want to leave the ERHS site?')
    </SCRIPT>
  • rwaller
    New Member
    • Mar 2007
    • 3

    #2
    callMsgBox2 undefined Firefox error console, works in IE

    callMsgBox2 undefined Firefox error console, works in IE ... help
    --------------------------------------------------------------------------------

    Works fine in IE, but not in Firefox? Code below, thank you in advance....this is for our school website. ine 66 is the code line error.

    http://www.cnusd.k12.c a.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpave lgcy.html


    <SCRIPT LANGUAGE=vbscri pt>
    function callMsgBox2(str Msg)
    callMsgBox2 = msgBox(strMsg,4 ,"Leaving ERHS")
    end function
    </SCRIPT>

    <SCRIPT LANGUAGE=javasc ript>
    function callMsgBox1(str Msg){
    var retVal = callMsgBox2(str Msg);
    var response = retVal
    if (response == 6){
    window.location .href = 'http://www.bricksrus.c om/order/erhs/index.htm' }
    else {
    window.location .href = 'http://www.cnusd.k12.c a.us/roosevelt%2Dhs/' }
    }
    callMsgBox1('Do you want to leave the ERHS site?')
    </SCRIPT>

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by rwaller
      Works fine in IE, but not in Firefox? Code below, thank you in advance....

      http://www.cnusd.k12.c a.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpave lgcy.html


      <SCRIPT LANGUAGE=vbscri pt>
      function callMsgBox2(str Msg)
      callMsgBox2 = msgBox(strMsg,4 ,"Leaving ERHS")
      end function
      </SCRIPT>

      <SCRIPT LANGUAGE=javasc ript>
      function callMsgBox1(str Msg){
      var retVal = callMsgBox2(str Msg);
      var response = retVal
      if (response == 6){
      window.location .href = 'http://www.bricksrus.c om/order/erhs/index.htm' }
      else {
      window.location .href = 'http://www.cnusd.k12.c a.us/roosevelt%2Dhs/' }
      }
      callMsgBox1('Do you want to leave the ERHS site?')
      </SCRIPT>
      Moved to Javascript forum.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by rwaller
        Works fine in IE, but not in Firefox? Code below, thank you in advance....

        http://www.cnusd.k12.c a.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpave lgcy.html


        <SCRIPT LANGUAGE=vbscri pt>
        function callMsgBox2(str Msg)
        callMsgBox2 = msgBox(strMsg,4 ,"Leaving ERHS")
        end function
        </SCRIPT>

        <SCRIPT LANGUAGE=javasc ript>
        function callMsgBox1(str Msg){
        var retVal = callMsgBox2(str Msg);
        var response = retVal
        if (response == 6){
        window.location .href = 'http://www.bricksrus.c om/order/erhs/index.htm' }
        else {
        window.location .href = 'http://www.cnusd.k12.c a.us/roosevelt%2Dhs/' }
        }
        callMsgBox1('Do you want to leave the ERHS site?')
        </SCRIPT>
        vbscript is IE-specific. It is not Javascript and will only work in IE. Just use a normal alert instead.

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Changed thread title slightly

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Merged threads only because there was a bit more information in one post otherwise it would have been deleted. Please do not double-post.

            Comment

            • rwaller
              New Member
              • Mar 2007
              • 3

              #7
              Originally posted by acoder
              Merged threads only because there was a bit more information in one post otherwise it would have been deleted. Please do not double-post.
              Thanks, sorry. I wanted to delete the first post because I thought I placed it in the wrong thread.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by rwaller
                Thanks, sorry. I wanted to delete the first post because I thought I placed it in the wrong thread.
                That's ok. We want to clean threads up so that we don't have multiple threads floating around.

                Re. your problem: you could detect if the object is supported and allow vbscript for IE and a normal alert for the rest of the browsers.

                Comment

                Working...