PDA

View Full Version : Ho to make Ajax page SEO friendly?



cyberjorge
04-07-2009, 07:38 AM
Hello!

How do I make this code non-obstrusive and Search Engine friendly?


<a href="javascript:showdiv('contentarea'); ajaxpage('page.html', 'contentarea');" title="Click to view this page" onClick='changeZIndex(10)';><img src="images/image1.jpg" style="margin-left:14px;" /></a>

Can you guys give samples based on the above code?

Thanks a lot!

Twey
04-07-2009, 08:16 AM
The same way you make it human-friendly: make sure your page works properly without Javascript enabled. In this case, that might involve something like:
<a href="page.html"
onclick="showdiv('contentarea');
ajaxpage(this.href, 'contentarea');
changeZIndex(10);"
title="Click to view this page">
<img src="images/image1.jpg"
style="margin-left: 14px;">
</a>

cyberjorge
04-07-2009, 08:59 AM
Thanks a lot for your response.

I tried your code, but it's not triggering the "ajaxpage(this.href, 'contentarea');" properly.

Any other suggestions?

Twey
04-07-2009, 09:51 AM
You'll have to give a bit more information than that.

cyberjorge
04-07-2009, 09:53 AM
Twey,

I'm sorry, I'll PM you the test site link so you can inspect.
Thanks for help!

Twey
04-07-2009, 10:17 AM
I see your site. Where exactly have you attempted to implement the code I gave you above?

cyberjorge
04-08-2009, 12:53 AM
It's in every link on the site, like the images, the banner, home, about us, etc.

Twey
04-08-2009, 11:46 AM
I'm seeing a lot of things like:
<a href="javascript:showdiv('contentarea'); ajaxpage('home.html', 'contentarea'); changeZIndex(4);" title="Go to home page" onclick=document.getElementById('headlbl').innerHTML='&nbsp;Property&nbsp;Holdings&nbsp;Co.';>That doesn't bear much resemblance to what I suggested at all, and it's certainly not search-engine– or human-friendly.