By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Ajax request is not working

P: 1
I am using prototype.js library to create an ajax library.
Below is the code.

Expand|Select|Wrap|Line Numbers
  1. function get_right_col()
  2. {
  3.  
  4.     new Ajax.Request('get_right_col.php', {
  5.  
  6.   method: 'get',
  7.  
  8.   onSuccess: function(transport) {
  9.  
  10.     var notice = $('right_col');
  11.       notice.update(transport.responseText);
  12.  
  13.   }
  14.  
  15. });
  16.  
  17. }
In normal condition it is working fine. But when the address bar contain a www then it is not working.

I am giving an example. If the address bar contains http://www.domain-name.com/pagename.php the code is not working.
but if the address bar contains http://domain-name.com/pagename.php then it is working fine.

Plz help me.

Looking forward to your reply.

Steve
Jan 4 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
Is the page that you're making the request from a domain without www. You may need to set the document.domain property. See, for example, this link.
Jan 4 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.