takuhii
01-16-2009, 03:46 PM
Hi,
I really need some help with this, I have a function that automatically generates a bulleted list of thumbnails;
function thumbs_getItemHTML(item)
{
var url_m = item.link;
return '<a href="' + url_m + '" title="' + item.title + '"><img src="' + item.url + '" width="152" height="80" border="0" alt="' + item.title + '" /></a>';
};
item.title & item.url are variables defined earlier in the script.
What I am try to do is make these thumbnails open in a DIV, on the same page. The DIV is called mainImage (surprisingly). I was wondering if someone could help me, as all current methods of functionality I have found tend to break becuase of the way my URLs are defined.
I was looking at adding something like this;
function loadContent(elementSelector, sourceUrl) {
$(""+elementSelector+"").load("http://yoursite.com/"+sourceURL+"");
}
and adding;
onClick="loadContent('#content', 'source_page.php');"
to the JavaScript URL I have above, but I can't figure out how to write it into my JavaScript "spit-up" at the top of my post...
Any ideas??
I really need some help with this, I have a function that automatically generates a bulleted list of thumbnails;
function thumbs_getItemHTML(item)
{
var url_m = item.link;
return '<a href="' + url_m + '" title="' + item.title + '"><img src="' + item.url + '" width="152" height="80" border="0" alt="' + item.title + '" /></a>';
};
item.title & item.url are variables defined earlier in the script.
What I am try to do is make these thumbnails open in a DIV, on the same page. The DIV is called mainImage (surprisingly). I was wondering if someone could help me, as all current methods of functionality I have found tend to break becuase of the way my URLs are defined.
I was looking at adding something like this;
function loadContent(elementSelector, sourceUrl) {
$(""+elementSelector+"").load("http://yoursite.com/"+sourceURL+"");
}
and adding;
onClick="loadContent('#content', 'source_page.php');"
to the JavaScript URL I have above, but I can't figure out how to write it into my JavaScript "spit-up" at the top of my post...
Any ideas??