View Full Version : Ajax tabs content script image file

10-10-2007, 05:17 PM
Hi there,

I want to use ajax tabs content script for show images but I can't do it there is simple code like bellow

<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#default" rel="ajaxcontentarea">Intro</a></li>
<li><a href="external.htm" rel="ajaxcontentarea">Bird</a></li>
<li><a href="external2.htm" rel="ajaxcontentarea">Dog</a></li>
<li><a href="external3.htm" rel="ajaxcontentarea">Cat</a></li>
<li><a href="external4.htm" rel="ajaxcontentarea" rev="content.css, content.js">Sea Otter</a></li>

I wrotw for my links like bellow

<li><a href="mysimpleimg.jpg" rel="ajaxcontentarea">Bird</a></li>


it doesnt work gives me image codes not image. How can I change it for my need ?

Thank you

10-10-2007, 10:33 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

You can't load an image directly using Ajax. That is to say, what Ajax does is fetch the textual representation of an external page, and if that page happens to include an <IMG> tag, the browser knows to show an image.

If all you're doing is using the script to show images, you're better off just using Tabs Content script (not the Ajax version): http://dynamicdrive.com/dynamicindex17/tabcontent.htm