469,286 Members | 2,422 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

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 5167
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.