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 ....?

 <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>

have you tried to test as it loads it enters to the function onload if not try putting an alert to the function to test it really enters to the function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.