Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Access denied on first call of page

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Programmers Exchange
View previous topic :: View next topic  
Author Message
matthiasmax
New one
New one


Joined: 29 Jul 2008
Posts: 1

PostPosted: Tue Jul 29, 2008 5:16 am    Post subject: Access denied on first call of page Reply with quote

Hi,

I'm encountering the phenomenom that I get an "access denied" error on the first call of my page. When I refresh or surf inside the page the error doesn't occur anymore. Here is the error causing code:

Code:

var searchReq = getXmlHttpRequestObject();

function getXmlHttpRequestObject() {
   if (window.XMLHttpRequest) {
      return new XMLHttpRequest();
   } else if(window.ActiveXObject) {
      return new ActiveXObject("Microsoft.XMLHTTP");
   } else {
      alert("INFO: Your browser does not support all functions on this website.");
   }
}

searchReq.open("GET", 'somephp.php?search=' + str, true);


Code not complete. Should be enough for seeing the problem though.

How can I solve this? I tried everything from initializing the searchReq in the body onLoad event and doing a first empty call to the page etc. No chance.

Any ideas?

Thanks in advance!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Programmers Exchange All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert