Hi all,
I got a question about the workings of ajax calls within silverstripe. Im trying to load external pages into one page, but so far its failing. What i need to do is get the title, description and images. Im trying to do this through jQuery but i cant get it to work. I think ive forgot something or am just missing something huge. If anyone can help me out that would be appreciated. I tried ajax_recipes but i think its deprecated because i got a warning that a string did not exist.
this is what im trying to do:
http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/
$.ajaxSetup ({
cache: false
});
var ajax_load = "<img src='themes/duskydesigns/images/load.gif' alt='loading...' />";
$(".portfolio-product").click(function(){
var url = $(this).attr( 'rel' ) + 'ajax';
$("#result").html(ajax_load).load(url);
alert( url );
});
Im trying to get the url through the rel wich is just #relativelink of the page in question. Im familiar with javascript but not much with ajax calls and especially not in silverstripe, any help would be appreciated!