Hi
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

Can you provide the code that you are using please.

This is tweetmeme button.js

<script type="text/javascript">
tweetmeme_style = 'compact';
</script>
<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);
  $('div.main-content').html(result.data);
  $('#page-title').html(result.title);
  window.location.hash = 'node-'+photoHash;
  Drupal.attachBehaviors('div.main-content');
  
}

unfortunately i have no experience in php drupal, hopefully someone else out here can help

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.