SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XMLHttpRequest error

    uncaught exception: No permission to call the method XMLHttpRequest.open

    Line 0
    That's the error I get. The only time I call XMLHttpRequest, is here:
    Code:
                   function item_selected() {
                      var oSelect = document.getElementById('slct_cat');
                      var sVal = oSelect.value;
    				  var lang = get_arg_val("lang");
    					var req = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('MSXML2.XMLHTTP.3.0');
        	              req.open('GET', 'menu.php?lang=' + lang + '&op=get_second_dropdown&selected_item=' + sVal, true);
            	          req.onreadystatechange = function (aEvt) {
                	        if (req.readyState == 4) {
                    	       if(req.status == 200)
                        	    create_second_dropdown(req.responseText);
    	                       else
        	                    alert('Error loading data');
            	            }
                	      };
                      req.send(null);					  
                   }
    I'm stumped... It worked fine for a week and a half, until five minutes ago. I didn't touch any of the javascript today

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your code works in my browser Firefox. Did you update your browser? Or did you disable the JavaScript in your browser to support?
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhmmm... I did turn Javascript off to test the non-Javascript navigation options. It was turned on after that, but I guess I forgot to refresh, or got used to it refreshing automatically when choosing an option =X It works again now. More coffee to me, and thank you to you.

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I got it again... It works fine when you're in index.php, but gives that error when you're in catalog.php...

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Sydney, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you trying to perform these actions before the page has had a chance to completely finish loading?
    Kind Regards,
    Steve
    http://www.rtepad.com

  6. #6
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope. Now it did on index.php as well. That page was loaded 5 minutes ago.

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Sydney, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is menu.php echoing out anything that starts with a http:// ?

    This error is usually triggered when the browser thinks the script is trying to access data from a domain other than the one it is located on
    Kind Regards,
    Steve
    http://www.rtepad.com

  8. #8
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    {['[Producten]=>0','Chloor tabletten=>1','Chloor granulaat=>2','Hypochloriet=>3','Pool Oxy Flash=>4','Pool Oxy PB=>5','pH-=>6','pH+=>7','pH- vloeibaar=>8','Flockfix=>9','Clari one=>10','Flovil=>11','Easy-Floc=>12','Sparkle plus=>13','Clari blue=>14','Clari bluemax=>15','Clari 2 in 1=>16','Algi stop=>17','Anti-calc=>18','Easy-Winter=>19','Bio-phos=>20','Hobby clean=>21']}
    That's all it generates.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •