No Javascript on this page

4,286 views
Skip to first unread message

dtr

unread,
Oct 7, 2011, 7:25:30 AM10/7/11
to Firebug
when trying to debug js in a jquery based page i get the following
message: "No Javascript on this page If <script> tags have a "type"
attribute it should equal "text/javascript" or "application/
javascript".
this seems to have worked in the past.
using ff 7.0.1 and firebug 1.8.3.
i guess this is because of templates using the script tag but have no
idea on what to do.

Jan Honza Odvarko

unread,
Oct 7, 2011, 7:44:41 AM10/7/11
to Firebug
Some options:

1) Sometimes if there is a script error on the page the entire script
compilation could fail and Firebug doesn't see the script.

2) Does it work with Firebug 1.9a3?
http://getfirebug.com/releases/firebug/1.9/

3) Any chance I could try your page on my machine?

4) Do you see any scripts when loading e.g. www.google.com?

Honza

dtr

unread,
Oct 7, 2011, 9:59:05 AM10/7/11
to Firebug
> 1) Sometimes if there is a script error on the page the entire script
> compilation could fail and Firebug doesn't see the script.
at least the ff error console does not show any script errors and the
same page can be debugged using the build-in chrome js debugger

> 2) Does it work with Firebug 1.9a3?
> http://getfirebug.com/releases/firebug/1.9/
nothing changed after the upgrade

> 3) Any chance I could try your page on my machine?
unfortunately not (server side in a lan)

> 4) Do you see any scripts when loading e.g. www.google.com?
yes

thank you
-dieter


On Oct 7, 1:44 pm, Jan Honza Odvarko <odva...@gmail.com> wrote:
> Some options:
>
> 1) Sometimes if there is a script error on the page the entire script
> compilation could fail and Firebug doesn't see the script.
>
> 2) Does it work with Firebug 1.9a3?http://getfirebug.com/releases/firebug/1.9/

Jan Honza Odvarko

unread,
Oct 7, 2011, 10:06:45 AM10/7/11
to Firebug
> > 3) Any chance I could try your page on my machine?
> unfortunately not (server side in a lan)
Could you please make simplified test case and attach it to a bug
report?
As soon as I can reproduce the problem, I can fix it.

Honza

dtr

unread,
Oct 7, 2011, 10:24:10 AM10/7/11
to Firebug
I for sure will try to create a test case but I do not yet understand
what goes wrong.
Could you please help me to better understand what the message means.

Thank you
-Dieter

Jan Honza Odvarko

unread,
Oct 7, 2011, 10:29:49 AM10/7/11
to Firebug
Firebug is using JSD to intercept load of every script on the page.

If "no javascript on this page" is displayed, it means that Firebug's
hook wasn't executed at all ie no script has been loaded on the page.

(or there is a bug in the hook)

Honza

Samuel Lugo Bueno

unread,
Oct 7, 2011, 11:31:43 AM10/7/11
to fir...@googlegroups.com
Hello guys, i get this issue quite often when doing maintenance to an ancient project done in ASP classic.
Since the server side script is doing heavy DB stuff sometimes the load time for a page goes from 3 seconds to 20 seconds, i've noticed that if the page load time goes up the 7 seconds, i mostly get the no script message or better yet, i do get the scripts but i cannot put breakpoints, and if i can create a breakpoint it doesn't gets hit.

It's really annoying but it has only happened on that legacy project, could be something about the load times or related to the server side scripting...

I'd gladly give you access to the site, but since it's a "For your eyes only" information regarding expenses we could ( at least me ) get in trouble.

I'll try to create a stand-alone example for you to give it a try.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Firebug" group.
To post to this group, send email to fir...@googlegroups.com.
To unsubscribe from this group, send email to firebug+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/firebug?hl=en.




--
"Do something worth remembering."
-Elvis Presley-

dtr

unread,
Oct 7, 2011, 1:08:42 PM10/7/11
to Firebug
I was now able to track this problem down to a most simple static html
page and my assumption that the script tag (id="categorytemplate"))
used to include templates are causing the problems.
I'm quite sure that this actually worked just fine before upgrading to
FF 7 and the build-in Chrome debugger has nothing to complain about as
well.
Thank you for all the great work,
Dieter

-----code-begin-----
<html>
<head>
<title>firebug test</title>
<script type="text/html" id="categorytemplate">
<li>" class="selectcategory"><button>button</button></li>
</script>
<script>
var i = 0;
i = i + 1;
</script>
</head>
<body>
<h1>firebug test</h1>
<p>page content</p>
</body>
</html>
-----code-end-----

Sebo

unread,
Oct 7, 2011, 6:07:13 PM10/7/11
to fir...@googlegroups.com
Never saw HTML code integrated in a script tag. How can this be used?

Testing your code in FF 7.0.1 + FB 1.8.3 + WinXP shows me the script inside the Script panel, because the second <script> tag contains JavaScript. So unfortunately I cannot reproduce that problem.
Do I need to do something else than copy that code into a file and open it in Firefox?

Sebastian

dtr

unread,
Oct 7, 2011, 7:50:35 PM10/7/11
to Firebug
> Never saw HTML code integrated in a script tag. How can this be used?
It's quite often used to store templates because the script tag
prevents the content from being rendered.
Usually the templates are in one or more external html files and
loaded on demand using an ajax call.
I have been able to reproduce the problem consistently but had to
reset all firebug Options before each test. (Firebug->Options->Reset
all Firebug options)

dtr

unread,
Oct 9, 2011, 1:14:53 PM10/9/11
to Jan Honza Odvarko, fir...@googlegroups.com
I hope that my test case helps to reproduce and understand my problem.
I'm now wondering if I need to open a bug or should rather wait for
feedback in this forum?
Thank you,
Dieter

Jan Honza Odvarko

unread,
Oct 10, 2011, 2:10:44 AM10/10/11
to Firebug
On Oct 9, 7:14 pm, dtr <dieter.oberkof...@gmail.com> wrote:
> I hope that my test case helps to reproduce and understand my problem.
I am not able to see the problem using the test case provided.
(tested with a fresh new profile: Firefox 7 + Firebug 1.8.3)

> I'm now wondering if I need to open a bug or should rather wait for
> feedback in this forum?
So, far we can't reproduce the problem so, not able to fix it.
As soon as we have a solid test case that helps us to see the problem,
then yes, please report a bug.

Thanks!
Honza

mattcoz

unread,
Oct 14, 2011, 12:15:49 PM10/14/11
to Firebug
I'm having this same problem on every site I go to, including www.google.com.
FF 10 nightly, FB 1.9a3.

On Oct 7, 6:44 am, Jan Honza Odvarko <odva...@gmail.com> wrote:
> Some options:
>
> 1) Sometimes if there is a script error on the page the entire script
> compilation could fail and Firebug doesn't see the script.
>
> 2) Does it work with Firebug 1.9a3?http://getfirebug.com/releases/firebug/1.9/
>
> 3) Any chance I could try your page on my machine?
>
> 4) Do you see any scripts when loading e.g.www.google.com?
>
> Honza
>
> On Oct 7, 1:25 pm, dtr <dieter.oberkof...@gmail.com> wrote:
>
>
>
>
>
>
>
> > when trying to debug js in a jquery based page i get the following
> > message: "No Javascript on this pageIf <script> tags have a "type"

mattcoz

unread,
Oct 14, 2011, 12:42:50 PM10/14/11
to Firebug
Nevermind, I can confirm that it is fixed in the latest hourly.

https://bugzilla.mozilla.org/show_bug.cgi?id=689101

dtr

unread,
Oct 15, 2011, 1:43:45 AM10/15/11
to Firebug
I did not really understand how this bug relates to my problem but
nevertheless happy to hear that it has been solved as I was unable to
provide any better test case.
When will it land in a version that I can download ?
Thank you for all the hard work.

Sebo

unread,
Oct 15, 2011, 6:46:52 PM10/15/11
to fir...@googlegroups.com
I did not really understand how this bug relates to my problem but
nevertheless happy to hear that it has been solved
What mattcoz is describing is unfortunately not what you (Dieter) are experiencing.
Explanation: In the Firefox nightly builds starting back in September there was a bug, that caused the Script panel to always show "No JavaScript on this page" (see bug 689101).
Though this just affected Firefox Aurora (9.0a2) and Nightly (10.0a1) and is unrelated to FF 7.0.1, so your problem is unfortunately not solved by the fix of bug 689101.

It's quite often used to store templates because the script tag prevents the content from being rendered.
Yes, the script tag prevents the code from being displayed, though I still wonder, why you put HTML code into a <script> tag. Sorry to say, but it looks to me like abusing the script tag, because as its name says, it should just contain scripts.
Usually the templates are in one or more external html files and loaded on demand using an ajax call.
Ok, but after that AJAX call you have the contents of that file in a variable. So why do you need to save it into a <script> tag?

While I am not convinced of that method your problem could still be a bug in Firebug (or Firefox). So you should test your test case from above in a fresh Firefox profile and tell us, if the problem is gone. If yes, it might be some preference or a conflict with another extension. Please also read the steps described at I found a Firebug Bug!. Please tell us then, if your problem persists. If so, we'll need to find a test case we can reproduce, too.

Btw. note, that the template in your example has a little mistake. It should not be <li>" class="selectcategory">, but <li class="selectcategory">.

Sebastian

dtr

unread,
Oct 17, 2011, 5:53:59 AM10/17/11
to Firebug
> What mattcoz is describing is unfortunately *not* what you (Dieter) are
> experiencing.
> Explanation: In the Firefox nightly builds starting back in September there
> was a bug, that caused the Script panel to always show "No JavaScript on
> this page" (see bug 689101<https://bugzilla.mozilla.org/show_bug.cgi?id=689101>
> ).
> Though this just affected Firefox Aurora (9.0a2) and Nightly (10.0a1) and is
> unrelated to FF 7.0.1, so your problem is unfortunately not solved by the
> fix of bug 689101.

unfortunately!

> It's quite often used to store templates because the script tag prevents the
> content from being rendered.
>
> Yes, the script tag prevents the code from being displayed, though I still
> wonder, why you put HTML code into a <script> tag. Sorry to say, but it
> looks to me like abusing the script tag, because as its name says, it should
> just contain scripts.
>
> Usually the templates are in one or more external html files and loaded on
> demand using an ajax call.
>
> Ok, but after that AJAX call you have the contents of that file in a
> variable. So why do you need to save it into a <script> tag?

I cannot really "defend" this method and agree that is seems a little
odd but it seems to have been introduced by John Resig himself (http://
ejohn.org/blog/javascript-micro-templating) in his original micro
templating blog entry and is widely used (at least) in the jQuery
universe.

> While I am not convinced of that method your problem could still be a bug in
> Firebug (or Firefox). So you should test your test case from above in a
> fresh Firefox profile and tell us, if the problem is gone. If yes, it might
> be some preference or a conflict with another extension. Please also read
> the steps described at I found a Firebug Bug!<http://getfirebug.com/wiki/index.php/I_found_a_Firebug_Bug%21>.
> Please tell us then, if your problem persists. If so, we'll need to find a
> test case we can reproduce, too.

1) I have again tried to debug my original application using a new
empty profile and the problem persists and if reproducible at will.
2) Unfortunately I'm no longer able to to reproduce this problem when
using the example I've created so I must agree that the problem might
be somewhere else and will try again to extract an example form my
original application.
3) I'm still not sure where to start looking on what might cause this
problem and any help on what might cause this message in FireBug might
help me.

Thank you,
Dieter


On Oct 16, 12:46 am, Sebo <sebastianzart...@gmx.de> wrote:
> > I did not really understand how this bug relates to my problem but
> > nevertheless happy to hear that it has been solved
>
> What mattcoz is describing is unfortunately *not* what you (Dieter) are
> experiencing.
> Explanation: In the Firefox nightly builds starting back in September there
> was a bug, that caused the Script panel to always show "No JavaScript on
> this page" (see bug 689101<https://bugzilla.mozilla.org/show_bug.cgi?id=689101>
> ).
> Though this just affected Firefox Aurora (9.0a2) and Nightly (10.0a1) and is
> unrelated to FF 7.0.1, so your problem is unfortunately not solved by the
> fix of bug 689101.
>
> It's quite often used to store templates because the script tag prevents the
> content from being rendered.
>
> Yes, the script tag prevents the code from being displayed, though I still
> wonder, why you put HTML code into a <script> tag. Sorry to say, but it
> looks to me like abusing the script tag, because as its name says, it should
> just contain scripts.
>
> Usually the templates are in one or more external html files and loaded on
> demand using an ajax call.
>
> Ok, but after that AJAX call you have the contents of that file in a
> variable. So why do you need to save it into a <script> tag?
>
> While I am not convinced of that method your problem could still be a bug in
> Firebug (or Firefox). So you should test your test case from above in a
> fresh Firefox profile and tell us, if the problem is gone. If yes, it might
> be some preference or a conflict with another extension. Please also read
> the steps described at I found a Firebug Bug!<http://getfirebug.com/wiki/index.php/I_found_a_Firebug_Bug%21>.

Sebo

unread,
Oct 17, 2011, 6:19:32 AM10/17/11
to fir...@googlegroups.com
I cannot really "defend" this method and agree that is seems a little
odd but it seems to have been introduced by John Resig himself (http://
ejohn.org/blog/javascript-
micro-templating) in his original micro
templating blog entry and is widely used (at least) in the jQuery
universe.
Well, I am also working with jQuery for long, but obviously I missed that until now. And even when I esteem John, I can't become friends with this templating method.
 
1) I have again tried to debug my original application using a new
empty profile and the problem persists and if reproducible at will.
Ok, thanks for letting us know.
 
2) Unfortunately I'm no longer able to to reproduce this problem when
using the example I've created so I must agree that the problem might
be somewhere else and will try again to extract an example form my
original application.
Ok, thanks for the hint. So we still need to find a simple, reproducible example.
 
3) I'm still not sure where to start looking on what might cause this
problem and any help on what might cause this message in FireBug might
help me.
First you should have a look at the MIME types of the JS files inside the Net panel and make sure, the JS code executes. If that's ok, then save the page as HTML file. First try to remove the whole body. If the Script panel shows the correct contents then, add the <body> contents again and try to remove part by part and check, if the Script panel displays the JS files again. As soon as it does, you'll know the part of the page, that caused the problem and you'll probably have the test case we need.

Sebastian
 

Thank you,
Dieter
Reply all
Reply to author
Forward
0 new messages