Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Location
    United States
    Posts
    158
    Thanks
    8
    Thanked 4 Times in 4 Posts

    Ajax Request Question

    Hello everyone. I'm trying to use an ajax request and getElementsByTagName, like so:
    Code:
    function show() {
    new Ajax.Request('file.php', {
    method: 'get',
    onSuccess: function(t) {
    var test = t.getElementsByTagName('span');
    alert (test.length);
    }
    });
    }
    
    file.php
    
    <span>Test</span>
    But it just seems to break. Thanks for your help

  • #2
    Regular Coder
    Join Date
    Oct 2009
    Location
    United States
    Posts
    158
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Nevermind, I'm just using xml with it now. Thanks again.


  •  

    Posting Permissions

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