java popup stops GIF anims?

R

Randy Webb

There is only one real reason to use the JavaScript
pseudo-protocol[1], and you aren't using it in that way.

[1] For using bookmarklets.

Before you say[1] the "only one reason"[2] you should open K-Meleon[3]
and find the Javascript Debugger[4].

[1] As much as you can "say" anything in usenet, its typed.

[2] I obviously disagree with that part.

[3] Its a Mozilla Based Browser, but lacks the Tools>Web
Development>Javascript Console path to open the Console.

[4] Its actually the Javascript Console, but I footnoted it in an effort
to make a point about the over-use of footnotes in Usenet[5]

[5] Even Usenet when its accessed by a web-based forum that portrays
itself as a private forum.


As for the javascript: pseudo-protocol, I just mentioned one very valid
use for it, can you name others (besides an href) and explain why they
are "bad" since you claim there is "only one reason" to use it?
 
E

Eugene

Hi....

I have a little javascript popup box that people click on to open up an
information panel.

I made some little blinking star anims on the page that stop blinking after
the popup has been activated - and stay "off" even after the popup is
closed.

any fix for this?

Here's the popup code:

function openit() {
newWindow = window.open('popups/newsflash.htm', 'newWindow',
'resizable,width=550,height=550,scrollbars=yes,resizable=yes,left=100,top=10
0');

Here's the anchor code:

<a href="javascript:eek:penit();"><font color="#FFFF99"><strong>NEWS
FLASH!!</strong></font></a></div>


thanks for any suggestions..

Eugene
 
M

Michael Winter

Hi....

I have a little javascript popup box that people click on to open up an
information panel.

I made some little blinking star anims on the page that stop blinking
after the popup has been activated - and stay "off" even after the
popup is closed.

any fix for this?

Probably because you are using the JavaScript pseudo-protocol. When you
click a link, the browser expects the page to change, so it stops things
like GIF animation. There is only one real reason to use the JavaScript
pseudo-protocol[1], and you aren't using it in that way.

I would recommend changing the HTML to:

<a href="newsflash.html"
onclick="openit();return false;">News Flash</a>

where newsflash.html provides an alternate, non-JavaScript[2] method of
reading the "news flash".

I would also recommend updating your page to use style sheets instead of
deprecated presentational elements like FONT, but this has no bearing on
your problem.

Mike

[1] For using bookmarklets.
[2] By that, I mean no JavaScript whatsoever. Only people with JavaScript
disabled will be reading that page, so there's no point in including
JavaScript.
 
R

Richard Cornford

<a href="javascript:eek:penit(); ...
<snip>

javascript pseudo protocol HREFs are treated as navigation by some
browsers/browser versions and once the browser gets the idea that it is
being navigated it stops bothering with resource hungry tasks on the
current page - pending its replacement. Stopping animating GIF images is
the most self evident symptom of the shutting down of resource hungry
tasks on the current page.

The solution to this (and other browser/version depended consequences of
their use) is to never use javascript pseudo protocol HREFs.

<URL: http://jibbering.com/faq/#FAQ4_26 >

Richard.
 
M

Michael Winter

Michael Winter wrote:
[snip]
There is only one real reason to use the JavaScript pseudo-protocol[1],
and you aren't using it in that way.

[1] For using bookmarklets.

Before you say[1] the "only one reason"[2] you should open K-Meleon[3]
and find the Javascript Debugger[4].

That's a bad example. What use would such a link be on a public webpage?
The method used might only work on that browser, rendering it useless for
the general population.
[1] As much as you can "say" anything in usenet, its typed.

[2] I obviously disagree with that part.

Rather than playing the fool, you simply could have said something like:

"While in principal I agree that use of the JavaScript pseudo-
protocol can be a bad idea, especially when a better alternative
exists, there are more good uses for it than you care to suggest."

....then list some good uses for it.
[3] Its a Mozilla Based Browser, but lacks the Tools>Web
Development>Javascript Console path to open the Console.

[4] Its actually the Javascript Console, but I footnoted it in an effort
to make a point about the over-use of footnotes in Usenet[5]

I used two, and only one, upon reflection, was unwarranted. Does is really
matter? I think not.
[5] Even Usenet when its accessed by a web-based forum that portrays
itself as a private forum.

As for the javascript: pseudo-protocol, I just mentioned one very valid
use for it, can you name others (besides an href) and explain why they
are "bad" since you claim there is "only one reason" to use it?

I can't, because I have *never* found a good use for it. That doesn't mean
to say there isn't, but I've never found one, and I seriously doubt the OP
will, either. The point is that the OP shouldn't be using it in this case.
It's also the point that you should be making: my general argument is
right, here, but isn't in every situation.

When used inappropriately, the pseudo-protocol is bad. It causes unwanted
side-effects (this thread is an example of that) and is inconsiderate of
users with JavaScript-disabled browsers.

In future, don't deride my comments. Simply correct me, politely.

Mike
 
G

George Hester

Are you saying that if the JavaScript protocol is removed everywhere in the op's page then the animating gifs will continue to animate after there has been some JavaScript interaction with the page? Thanks.
 
R

Richard Cornford

You have to reload the page.
<snip>

Reloading the page is a ludicrously indirect way of addressing a problem
with a known and clearly identified cause and a simple solution. But
typical of *your* coding style.

Richard.
 
R

Richard Cornford

George Hester said:
Are you saying that if the JavaScript protocol is removed
everywhere in the op's page then the animating gifs will
continue to animate after there has been some JavaScript
interaction with the page? Thanks.

I told you the answer to that question 11 months ago. You weren't
interested then and I have no intention of wasting any more of my time
on you.

Richard.
 
R

Randy Webb

Michael said:
If I frequented this group during the time of that thread, I would have
either kill-filed you immediately, or continued to read the thread
simply to discover just how stupid you are.

By the way, I did actually post a helpful response. This is just to vent
my frustration after reading that thread.

He's something else, isn't he? I had to go to google to see what he was
babbling, because I have had him killfiled for a while now and can't
remember how I did it in NS7 to undo it. I find him hilarious at times.

And my apologies for my last post to you.
 
R

Richard Cornford

god almighty what a nasty group this place has sometimes.

As you sow, so you reap. Go back and look at when you asked this
question in February 2003:-

<URL:
http://groups.google.com/groups?threadm=P1L%9.45317$iK4.41234@twis
ter.nyroc.rr.com >

-and particularly your responses to the advice you were given. And then
tell me what possible reason you could have for expecting anything
resembling help form me.

Richard.
 
K

kaeli

god almighty what a nasty group this place has sometimes.

As you sow, so you reap. Go back and look at when you asked this
question in February 2003:-

<URL:
http://groups.google.com/groups?threadm=P1L%9.45317$iK4.41234@twis
ter.nyroc.rr.com >

-and particularly your responses to the advice you were given. And then
tell me what possible reason you could have for expecting anything
resembling help form me.

Or from the rest of us who have him killfiled from that time so we don't
have to read the arguing.

Would you stop arguing with him now? ;)


--
--
~kaeli~
Is it true that cannibals don't eat clowns because they
taste funny?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
M

Michael Winter

[Fixed top-post]

The problem is the use of the JavaScript pseudo-protocol (<a
href="javascript:..."). When the user clicks on a link, the browser stops
most activities in preparation to load the new page. The expectation is
that the new page will completely replace the existing content so it
doesn't really have to bother with rendering the current page. One effect
of this is stopping the animation of images. However, calling a JavaScript
function that does something mundane, like just displaying an alert box,
doesn't replace the content. The page is left in this "reduced state", and
stays that way. Whilst refreshing the page will restart the animation, the
more intelligent solution is to move JavaScript code from the href
attribute to the onclick intrinsic event.

Please, learn from those that are far more knowledgeable than you instead
of insulting them. If you cannot grasp the solution to such a simple
problem, especially when the said solution was presented to you numerous
times, I don't believe you should ever offer assistance to anyone in the
future. You are clearly not able to educate yourself, let alone others.

Mike
 
M

Michael Winter

[Fixed top-posting and set follow-ups to alt.flame]

Considering that you show no regard to the established etiquette of this
group, and many others, it is not surprising that some members show an
element of hostility towards you.

After reading the thread that Mr Cornford pointed to, I felt the
overwhelming need to ask you: "Are you really that dense?" You were given
the answer at least seven times, yet you ignored it then, and you still
ignore it now.
Wise words from an imbecile.

If I frequented this group during the time of that thread, I would have
either kill-filed you immediately, or continued to read the thread simply
to discover just how stupid you are.

By the way, I did actually post a helpful response. This is just to vent
my frustration after reading that thread.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top