In my web page i am using tweetmeme button java script code.its working fine.When i was trying to put js code inside ajax content,and click the ajax callback button the entire page shows blank page.I thought the reason for this is java script using window.location.href.But i am not sure what is the exact reason for this issue.

If i remove the tweetmeme button js code,ajax navigation button working fine.

please help me to solve this issue.

Thanks in Advance

Santhanaraj R

7 Years
Discussion Span
Last Post by sanraj25

This is tweetmeme button.js

<script type="text/javascript">
tweetmeme_style = 'compact';
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

This is my ajax coding. I am implementing this on php drupal.

var photoHash;
Drupal.behaviors.ajaxGallery = function(context) {
  var base = Drupal.settings.basePath;
  $('div.nav a:not(.ajaxgallery-processed)', context).addClass('ajaxgallery-processed')
  .bind('click', function(){
    photoHash = parseInt(this.id.substring(8), 10);
    $.get(base+'gallery/get/photos/'+photoHash,  null, imageDetails);
    return false;
  } );


var imageDetails = function(response) {
  var result = Drupal.parseJson(response);
  window.location.hash = 'node-'+photoHash;

thanks for your reply.But I thing there is no need to know about php.This is a issue related with java script and ajax. You can try with your preferred language.Thing is if you use java script inside ajax content will make error.

Edited by sanraj25: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.