news@chthonic.f9.co.uk schrieb:
>> On closing this image page with
>> <a href="javascript:history.back();">Button.gif</a>
[quoted text clipped - 9 lines]
>> But after actuating the rollover,
>> FF requires a double click.
Very many thanks for your helpful answer.
It gives me a lot to chew on...
Please allow some questions - not to question your
statements, but to get a clearer picture, if possible.
> Of course it does - clicking your close.gif
> causes the browser to call change(); and then
[quoted text clipped - 10 lines]
>
> <a href="#" onClick= "change();return false;">Close.gif</a>
I think I understand what you say, but why does the
"return false" at the end of function change() not
serve the same purpose?
> [Yes there are _better_ ways of doing this, but
> this solves his immediate problem].
Yes it does, and I'm most grateful for this.
I too tried to put the onClick into the image line:
<img onClick="change();return false;" name="placeholder" src="...
and it works well too - as you say.
Would you mind commenting any further on "better ways"?
> That your page is ONLY usable to those with
> javascript, but no doubt you will encounter
> THAT little problem later...
I tested my project (only now) with js switched off and the
only real problem are the many rollovers. Would you please
indicate how to modify my js code?
I read somewhere to put an url in place of the # in
<a href="#" onClick="change();return false;">
Would that mean to load a complete new page for
each successive image? Would that be the proper way
to simulate a rollover without js?
One final question: would you know a recent book
on issues involved here? I know of www.w3.org and
google for js - but as usual, try to find the needle
in the haystack of statements. What would be helpful
is a clever book to set a frame of today's js use.
Very many thanks again!
Heinrich Wolf
news@chthonic.f9.co.uk - 30 May 2007 21:34 GMT
> n...@chthonic.f9.co.uk schrieb:
>
[quoted text clipped - 8 lines]
> "return false" at the end of function change() not
> serve the same purpose?
Because onclick="change();" doesn't return the false
value to the browser. What you actually wanted was
onclick="return change();" - I didn't see the return false;
stuck on the end of your original function and thought it
was easier to make 1 change rather than 2.
> > [Yes there are _better_ ways of doing this, but
> > this solves his immediate problem].
[quoted text clipped - 14 lines]
> only real problem are the many rollovers. Would you please
> indicate how to modify my js code?
You can't modify JS code to cope with there being no
javascript - no code runs in that case. Rather you need
to consider your site design and make sure that those
without JS can at least use some of the site, and are
politely informed when areas that depend on it fail to
work.
> I read somewhere to put an url in place of the # in
> <a href="#" onClick="change();return false;">
> Would that mean to load a complete new page for
> each successive image? Would that be the proper way
> to simulate a rollover without js?
It would be a horrible way of doing it, but it
would work. Rather, replacing the # with a url is
a way of being nice to people without JS - you
make sure the url triggers the same thing as the
javascript. Rollovers can just get dropped entirely.
> One final question: would you know a recent book
> on issues involved here? I know ofwww.w3.organd
> google for js - but as usual, try to find the needle
> in the haystack of statements. What would be helpful
> is a clever book to set a frame of today's js use.
No idea, but these approaches do get discussed here
regularly, so trawl through the archives - try searching
for NOSCRIPT and href="#"
Heinrich Wolf - 31 May 2007 11:11 GMT
news@chthonic.f9.co.uk schrieb:
>> n...@chthonic.f9.co.uk schrieb:
>>
>>> Rewrite the way you call your javascript and
>>> all will be well. Either attach the call
[skipped]
Very many thanks again.
You have been very helpful re current issue
and have answered some questions I have been
"carrying about" for some time.
Heinrich Wolf