473,387 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 5378
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

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

Similar topics

5
by: Reza Roby | last post by:
The following code reports a runtime error "v has no properties." function ff() { var v; v.x=5; //error alert(v.x); } But this one alerts "undefined":
5
by: LRW | last post by:
(Sorry if this is a repost...my newsreader keeps crashing on the posting--I don't know if the message going out or not) For some reason this javascript just won't work in Firefox. It works fine...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
5
by: Derek Erb | last post by:
I am banging my head against the wall with this one. The following code snippets work perfectly fine in MSIE6. But produce an error in Firefox and do not work at all. BROWSER.HTM <HTML> .......
3
by: niconedz | last post by:
Hi The following code works fine in IE but not Firefox. It's a little script that zooms an image and resizes the window to fit. Can anybody tell me what's wrong? Thanks Nico == btw.....
25
by: Frances | last post by:
I have an html file, checked css syntax online (http://jigsaw.w3.org/css-validator/validator-uri.html.en) it all checks fine, got no errors or warnings.. however Firefox is not reading...
19
by: roN | last post by:
Hi, I got following: http://www.inetgate.ch/design.htm It works in Firefox and in Netscape nice 'n fine but not in Explorer...why not? What to change? Thank you! -- chEErs roN I'm root, I'm...
1
by: OtisUsenet | last post by:
Hi, I have a bookmarklet that works perfectly in Firefox, IE, Konqueror, and Opera, but in Safari 2.0.3 (417.9.2) it doesn't work. I enabled debugging and I can see "TypeError - Undefined...
0
by: Wayne Deleersnyder | last post by:
Hi All, I'm hoping to try to solve this error. I'm currently putting together a little web app, but I need it to work under both IE6, IE7, Mozilla, etc... Although the formatting is off for...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.