Author Topic

Lo' F.

Tuesday 19 October 2010 9:28:08 am

Comment62823

I have been trying implementing an ajax script but just can pass the template content into a div, not able to pass value to its <a href=..>.

So I skipped Ajax for jQuery but when I pass the value through jquery.. cannot make it work - when I click the video it just ignores the given video's path (the player behaves as it is searching for the file and cannot find it) even though on mouse over this path is displayed in the browser status bar and in firebug the value matches the href attribute.

This is the jquery script inserted in the head of pagelayout.tpl:

{literal}
<script type="text/javascript">
var videoPath = "";
var videoTitle = "";
$(document).ready(function() {
  $("a#video").click(function() { 
    videoPath = $(this).attr('href');
    videoTitle = $(this).attr('title');
    //alert(videoPath + "\r\n " +videoTitle);
    return false;
  });
});

$(document).ready(function() {
  $("a#player").attr({href: videoPath, title: videoTitle});
});
</script>
{/literal}

..

If there might be something to accomplish what I am trying to do, which has more to do with Exponential I am all ears!

Or if you can see any flaw in here why it is behaving such so, any hint would be, as always, highly appreciated!

loredanaebook.it