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
    New Coder
    Join Date
    Jul 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Not able to load content onload in Apache Server

    HI,

    Am trying for onload page content from backend(perl) using Ajax .When Tried with simple CGIHTTPServer then, the pages is getting load as required .

    But as same page i moved to Apache Server , the content are not getting load .Am not getting any error also..

    how to debug this error ....?


    Code:
     <script type="text/javascript">
     $(onload)
     function onload() {
     $.ajax({
                     type: 'POST',
                         url: '/cgi-bin/onload.pl',
                     async: false,
     success: function(data) {
     $('[key]',data).each(function(){
     $('[name=chk_'+$(this).attr('key')+']').attr('checked',true)
     })
     }
     })
     }
     </script>
    
    
    
    <body>
    <form>
    <input name='chk_0' type='checkbox' />0<br />
    <input name='chk_1' type='checkbox' />1<br />
    <input name='chk_2' type='checkbox' />2<br />
    <input name='chk_3' type='checkbox' />3<br />
    <input name='chk_4' type='checkbox' />4<br />
    <input name='chk_5' type='checkbox' />5<br />
    <input name='chk_6' type='checkbox' />6<br />
    <input name='chk_7' type='checkbox' />7<br />
    <input name='chk_8' type='checkbox' />8<br />
    <input name='chk_9' type='checkbox' />9<br />
    <input name='chk_10' type='checkbox' />10<br />
    <input name='chk_11' type='checkbox' />11<br />
    <input name='chk_12' type='checkbox' />12<br />
    <input name='chk_13' type='checkbox' />13<br />
    <input name='chk_14' type='checkbox' />14<br />
    <input name='chk_15' type='checkbox' />15<br />
    </form>
    </body>

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Have you checked the httpd error logs to verify that the server isn't tossing any errors?
    Attach directly to that cgi-bin/onload.pl. Does that work? Have you configured perl to run on the apache webserver?
    If it does work when directly connected, then its your JS.


  •  

    Posting Permissions

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