Loading another page via an onClick()

T

Todd Cary

I would like to use an onClick() event handler to load another page but
I am not sure if it can be done, and if it can, how to do it;

<li onclick="loadMyPage('http://209.204.172.137/)">
</li>

I need to use the onClick rather than using an "<a>" tag.

Todd
 
R

RobB

Todd said:
I would like to use an onClick() event handler to load another page but
I am not sure if it can be done, and if it can, how to do it;

<li onclick="loadMyPage('http://209.204.172.137/)">
</li>

I need to use the onClick rather than using an "<a>" tag.

Todd

If you don't use real links inside those <li> tags, you'll hamstring
JS-disabled users, and the content won't be spiderable.

Try:

<li style="cursor:pointer;"
onclick="top.location='http://209.204.172.137/'">....
 
D

Dr John Stockton

JRS: In article <[email protected]>,
dated Thu, 24 Feb 2005 12:06:52, seen in RobB
If you don't use real links inside those <li> tags, you'll hamstring
JS-disabled users, and the content won't be spiderable.

Yes and no?, respectively.

Rendering one link non-spiderable prevents spiders following that link.
It does not prevent them following any other link that may exist,
somewhere in the World-Wide Web.

To ensure that a site is fully spiderable, it is AIUI sufficient to
connect all pages with a ring of "next" links, which need not be
conspicuous to a human. then, if any page is found, all should be.
 

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