473,399 Members | 3,401 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,399 software developers and data experts.

"error on page"

How do you track down this to where the error actually is?

TIA, Lee
Jul 23 '05 #1
12 1856
Depends on the browser,
in Internet Explorer for instance, you can double click
on the error icon: left-lower corner, and view the details ...

Jul 23 '05 #2
Lee David said the following on 7/21/2005 4:46 PM:
How do you track down this to where the error actually is?


You read the error message. It states what the error is and what line it
is on. To see the error message, in IE, you double click the Yellow !,
in Mozilla you go Tools>Web Development>Javascript Console.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #3
Thank you. When I reopened the page it lead me directly to the "operator
error" (my mistake) of not knowing how to spell "document" correctly. Now I
just need to find out how to get the Netscape browser identified. This
didn't work:

if (document.layers)
{
alert("**testing** NS");
var ns4test = true;
var ie4test = false;
}

Nor did the more compact:
ns4test = document.layers?true:false;

Again, thanks for the quick response... I'll put my shoe down and the
monitor is safe again.

Lee

"frizzle" <ph********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Depends on the browser,
in Internet Explorer for instance, you can double click
on the error icon: left-lower corner, and view the details ...

Jul 23 '05 #4
Lee David said the following on 7/21/2005 6:36 PM:
Thank you. When I reopened the page it lead me directly to the "operator
error" (my mistake) of not knowing how to spell "document" correctly. Now I
just need to find out how to get the Netscape browser identified. This
didn't work:
Why does it matter if its Netscape, Mozilla, FunkyBrowser or
myBrowserThatIMadeUpTheName? You don't browser detect, you feature detect.
if (document.layers)
{
alert("**testing** NS");
var ns4test = true;
var ie4test = false;
}

Nor did the more compact:
ns4test = document.layers?true:false;
That actually "works", it just doesn't work the way you think it would.
Again, thanks for the quick response... I'll put my shoe down and the
monitor is safe again.


if (document.layers){
//use the document.layers collection
}

if (document.getElementByID){
//use the getElementByID method
}

if (document.all){
//use the document.all collection
}

And all that without caring what browser it was. This is covered in the
groups FAQ.

And please don't top-post.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Jul 23 '05 #5
Lee David wrote:
[...]

Nor did the more compact:
ns4test = document.layers?true:false;


For the sake of the exercise:

var supportForLayers = !!document.layers;

The use of !! forces the result to be explicitly true or false and have
the right sense.
[...]

--
Rob
Jul 23 '05 #6
> For the sake of the exercise:

var supportForLayers = !!document.layers;

The use of !! forces the result to be explicitly true or false and have
the right sense.


I'm using <div> to enclose the text that I want to appear. I understand
that Layers is an older and not needed technology. However, the check for
it indicates the usage of NS which used totally different values than IE
does. Therefore, I'm assuming I could use the above and then have code like
this:

if (supportForLayers)
{
turn on the various <div> based on which object incurred the mouseover or
mouseout event using "show"
turn off the various <div> that are not applicable to the triggering event
using "hide"
}

if (supportForAll)
{
turn on the various <div> based on which object incurred the mouseover or
mouseout event using "visible"
turn off the various <div> that are not applicable to the triggering event
using "hidden"
}

Would I need something for Opera, Firefox or other modzilla browsers?

Thanks, Lee
Jul 23 '05 #7
>
Why does it matter if its Netscape, Mozilla, FunkyBrowser or
myBrowserThatIMadeUpTheName? You don't browser detect, you feature detect.

Because specific browsers have specific and unique values such as Netscape's
"show" vs. the IE "visible."

That actually "works", it just doesn't work the way you think it would.

Could you elaborate on how it is working vs. how it would be expected to?

if (document.layers){
//use the document.layers collection
}

if (document.getElementByID){
//use the getElementByID method
}

if (document.all){
//use the document.all collection
}

And all that without caring what browser it was. This is covered in the
groups FAQ.


I've seen 4.15 and it doesn't give very much information. For example, how
to apply anything it says at all. Do you happen to know of a tutorial that
does explain it and give examples?

Thanks, Lee
Jul 23 '05 #8
> if (document.layers){
//use the document.layers collection
}

if (document.getElementByID){
//use the getElementByID method
}

if (document.all){
//use the document.all collection
}


BTW, I tested each of these under NS7.2 and they all returned false.

Thanks, Lee
Jul 23 '05 #9
Lee David wrote:
if (document.layers){
//use the document.layers collection
}

if (document.getElementByID){

----------------------------^

if ( document.getElementById ){

Case sensitivity's a bitch, eh?
[...]

--
Rob
Jul 23 '05 #10
Lee David wrote:
For the sake of the exercise:

var supportForLayers = !!document.layers;

The use of !! forces the result to be explicitly true or false and have
the right sense.
I'm using <div> to enclose the text that I want to appear. I understand
that Layers is an older and not needed technology. However, the check for
it indicates the usage of NS which used totally different values than IE
does. Therefore, I'm assuming I could use the above and then have code like
this:

if (supportForLayers)
{
turn on the various <div> based on which object incurred the mouseover or
mouseout event using "show"
turn off the various <div> that are not applicable to the triggering event
using "hide"
}

if (supportForAll)
{
turn on the various <div> based on which object incurred the mouseover or
mouseout event using "visible"
turn off the various <div> that are not applicable to the triggering event
using "hidden"
}


That's the right strategy, only test for the most common choice first -
Communicator 4 represents perhaps 1:1000 web surfers, so do the test
that will be true for the vast majority of cases first.
function setVisibility ( el, state ) {
if ( el.style ) {
el.style.visibility = ('visible'==state)? 'visible' : 'hidden';
} else if ( el.visibility ) {
el.visibility = ('visible'==state)? 'show' : 'hide';
} else {
// Some other option?
}
}
If the above is called with:

setVisibility ( elementReference, 'visible' );

it will change the visibility property to visible or show. Anything
else and it will be changed to hidden or hide.

I don't have Communicator 4 handy so I can't test it, but it should be OK.

Would I need something for Opera, Firefox or other modzilla browsers?


No. The idea is to test for functionality, not browser.

--
Rob
Jul 23 '05 #11
I want to thank you t h i s much. It works now and at
last I can move on to the next (to be discovered) problem!

Lee
Jul 23 '05 #12
RobG said the following on 7/21/2005 11:44 PM:
Lee David wrote:
if (document.layers){
//use the document.layers collection
}

if (document.getElementByID){


----------------------------^

if ( document.getElementById ){

Case sensitivity's a bitch, eh?


Aint it though? I will have to smack myself on the hands for that one.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: theroo | last post by:
Hi there, I am driving myself crazy over this problem. I have used this very same function in another page without any problems, but now I am experiencing the "Error: Expected ';'" when i try...
0
by: Erick Lopez | last post by:
When I send my web page to browser in ouput windows recibe this message and the web page the error BC32400 Please Help me Auto-attach to process ' aspnet_wp.exe' on machine 'TABLET'...
3
by: NuB | last post by:
I have a C# web form that allows the user to perform a search if all the required fields are filled in, which works fine, my issue is if a user does a sucessfull search then enters in data and...
3
by: ton | last post by:
Hi, I've developed some webcontrols in VB, I'm using these in a website project If the webcontrol is getting an error I ll get the message: Server error in '/' application, and than more...
21
by: comp.lang.tcl | last post by:
set php {<? print_r("Hello World"); ?>} puts $php; # PRINTS OUT <? print_r("Hello World"); ?> puts When I try this within TCL I get the following error:
7
by: DC | last post by:
Hi, there is a 500;13 page one can configure in the website properties, but ..Net Framework 1.1 also delivers the "server too busy" message sometimes and the IIS custom error page does not seem...
3
by: Willy | last post by:
I have a website that uses querystrings on a certain page to show multiple contents. I have created mapped pages to hide the gory details of these querystrings. So instead of...
1
by: bruce | last post by:
i'm getting the following error: mechanize._response.httperror_seek_wrapper: HTTP Error 500: i'm running python 5.1 and mechanize 0.1.7b I have no idea as to what I have to...
6
sueb
by: sueb | last post by:
I'm implementing a report that has an entirely different first page than the rest of the pages (the first page gets printed on an original form, but the following pages have their much-more-simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.