...

View Full Version : Failing in loading the Preloader



bhakti_thakkar
07-17-2007, 02:51 PM
Hi all,
i have 2 php pages i.e relations.php and save_relations.php. the relation form action ="save_relations.php" where there is just the saving of the user inputs and then redirecting the user to the view. i have written a ajax-javascript in save_relations that gives me an error "null" is not an object :rolleyes:
can some one please tell me where am i failing :confused:

<?
if ($submit=="save") {
// save code goes here
}
?>

<script language="javascript" type="text/javascript">
<!--
ajaxFunction();
//Browser Support Code
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!

try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
ajaxRequest.onreadystatechange = function(){

if(ajaxRequest.readyState == 4){
alert(ajaxDisplay);
var ajaxDisplay = document.getElementById('ajaxDiv');

ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
var ajaxDisplay = document.getElementById('ajaxDiv');
ajaxDisplay.innerHTML ="<img src='images/loading.gif'> <b>loading..</b>";
window.location.href="relations.php?relation_id=<?=$relation_id?>";


}

//-->
</script> <div id='ajaxDiv'> </div>

NancyJ
07-17-2007, 02:53 PM
For a start, you're failing to identify the correct forum to post in. This is not a php issue.

bhakti_thakkar
07-17-2007, 03:07 PM
Noted immediately!!! and reposting it in javascript section.
Thanks



For a start, you're failing to identify the correct forum to post in. This is not a php issue.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum