471,896 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

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.ca.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpavelgcy.html


<SCRIPT LANGUAGE=vbscript>
function callMsgBox2(strMsg)
callMsgBox2 = msgBox(strMsg,4,"Leaving ERHS")
end function
</SCRIPT>

<SCRIPT LANGUAGE=javascript>
function callMsgBox1(strMsg){
var retVal = callMsgBox2(strMsg);
var response = retVal
if (response == 6){
window.location.href = 'http://www.bricksrus.com/order/erhs/index.htm' }
else {
window.location.href = 'http://www.cnusd.k12.ca.us/roosevelt%2Dhs/' }
}
callMsgBox1('Do you want to leave the ERHS site?')
</SCRIPT>
Mar 29 '07 #1
7 5218
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.ca.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpavelgcy.html


<SCRIPT LANGUAGE=vbscript>
function callMsgBox2(strMsg)
callMsgBox2 = msgBox(strMsg,4,"Leaving ERHS")
end function
</SCRIPT>

<SCRIPT LANGUAGE=javascript>
function callMsgBox1(strMsg){
var retVal = callMsgBox2(strMsg);
var response = retVal
if (response == 6){
window.location.href = 'http://www.bricksrus.com/order/erhs/index.htm' }
else {
window.location.href = 'http://www.cnusd.k12.ca.us/roosevelt%2Dhs/' }
}
callMsgBox1('Do you want to leave the ERHS site?')
</SCRIPT>
Mar 29 '07 #2
r035198x
13,262 8TB
Works fine in IE, but not in Firefox? Code below, thank you in advance....

http://www.cnusd.k12.ca.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpavelgcy.html


<SCRIPT LANGUAGE=vbscript>
function callMsgBox2(strMsg)
callMsgBox2 = msgBox(strMsg,4,"Leaving ERHS")
end function
</SCRIPT>

<SCRIPT LANGUAGE=javascript>
function callMsgBox1(strMsg){
var retVal = callMsgBox2(strMsg);
var response = retVal
if (response == 6){
window.location.href = 'http://www.bricksrus.com/order/erhs/index.htm' }
else {
window.location.href = 'http://www.cnusd.k12.ca.us/roosevelt%2Dhs/' }
}
callMsgBox1('Do you want to leave the ERHS site?')
</SCRIPT>
Moved to Javascript forum.
Mar 30 '07 #3
acoder
16,027 Expert Mod 8TB
Works fine in IE, but not in Firefox? Code below, thank you in advance....

http://www.cnusd.k12.ca.us/roosevelt%2Dhs/Leaving_Site/leavingERHSpavelgcy.html


<SCRIPT LANGUAGE=vbscript>
function callMsgBox2(strMsg)
callMsgBox2 = msgBox(strMsg,4,"Leaving ERHS")
end function
</SCRIPT>

<SCRIPT LANGUAGE=javascript>
function callMsgBox1(strMsg){
var retVal = callMsgBox2(strMsg);
var response = retVal
if (response == 6){
window.location.href = 'http://www.bricksrus.com/order/erhs/index.htm' }
else {
window.location.href = 'http://www.cnusd.k12.ca.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.
Mar 30 '07 #4
acoder
16,027 Expert Mod 8TB
Changed thread title slightly
Mar 30 '07 #5
acoder
16,027 Expert Mod 8TB
Merged threads only because there was a bit more information in one post otherwise it would have been deleted. Please do not double-post.
Mar 30 '07 #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.
Thanks, sorry. I wanted to delete the first post because I thought I placed it in the wrong thread.
Apr 2 '07 #7
acoder
16,027 Expert Mod 8TB
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.
Apr 3 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Reza Roby | last post: by
5 posts views Thread by LRW | last post: by
3 posts views Thread by niconedz | last post: by
25 posts views Thread by Frances | last post: by
19 posts views Thread by roN | last post: by
reply views Thread by Wayne Deleersnyder | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.