473,320 Members | 2,124 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,320 software developers and data experts.

how to write text to Mozilla JavaScript Console

I would like to find out how to write out messages to the Mozilla
JavaScript Console. This would allow me to have a client-side record
of execution which would be ideal in debugging end-user problems.

I am looking for something like
javascript:mozilla.jsconsole.messages.write("some debug string");
Jul 20 '05 #1
3 2686
Derek_Bennett wrote:
I would like to find out how to write out messages to the Mozilla
JavaScript Console. This would allow me to have a client-side record
of execution which would be ideal in debugging end-user problems.

I am looking for something like
javascript:mozilla.jsconsole.messages.write("some debug string");


I think it's
dump("some debug string");

But you have to enable it in about:config

Again, this is strictly IIRC

Jul 20 '05 #2
Keith Bowes <do****@spam.me> wrote in message news:<SX******************@fe02.usenetserver.com>. ..
Derek_Bennett wrote:
I would like to find out how to write out messages to the Mozilla
JavaScript Console. This would allow me to have a client-side record
of execution which would be ideal in debugging end-user problems.

I am looking for something like
javascript:mozilla.jsconsole.messages.write("some debug string");


I think it's
dump("some debug string");

But you have to enable it in about:config

Again, this is strictly IIRC


You recall incorrectly, it seems.
There is no mention of any similar setting in about:config.
I was unable to call javascript:dump("blah") from the address bar or
the JSConsole evaluate bar.

If you have any other information, I would be glad to hear it!
Jul 20 '05 #3


Derek_Bennett wrote:
I would like to find out how to write out messages to the Mozilla
JavaScript Console. This would allow me to have a client-side record
of execution which would be ideal in debugging end-user problems.

I am looking for something like
javascript:mozilla.jsconsole.messages.write("some debug string");


You need XPConnect privileges to do that e.g. try the following from
file: URL and grant the privilege when prompted:

netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var jsConsoleService =
Components.classes['@mozilla.org/consoleservice;1'].getService();
jsConsoleService.QueryInterface(Components.interfa ces.nsIConsoleService);
jsConsoleService.logStringMessage('Kibology for all.')

Then the message should appear in the JavaScript console. However
requesting privileges from http: URL is with normal browser settings
only possible if the script is signed.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4

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

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":
7
by: Scott | last post by:
I need help to modify the code below to pass url variables from a framset. The click to run this will be in the mainFrame. This script works well in a non-frame page. Grabs the current url...
3
by: Java script Dude | last post by:
I have still yet to see a JavaScript Editor that comes close to reading a good JS book, learing it and using it with a text editor. Anyway, here my recipe for build successfull DHTML...
4
by: Bernard | last post by:
Hi, I am suddenly getting Safari script errors with the following user agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8 In a...
6
by: LRW | last post by:
I have a Javascript that makes a tablerow visible ot invisible, that works fine in InternetExplorer, but in Mozilla it's unresponsive and I get the following Javascript Console error: Error:...
3
by: Vanitha | last post by:
Hi All, The following syntax is not working on Mozilla browser, however this works on IE. <input id="freq" size="20" name="freq" type="text"> When i refer this freq from a javascript...
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
12
by: Randell D. | last post by:
Folks, I have a form called "ourTestForm". Its a test form - nothing special - it contains five input tags - they are named one, two, three, four and five. The input tags are of type...
3
by: kj | last post by:
How can a script send (non-fatal) warnings and other such messages to Firefox's JavaScript console? Thanks! kj -- NOTE: In my address everything before the first period is backwards; and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.