Jump to content

Recommended Posts

I have some problem to show the photo list using ajax.  In this code is working fine in IE but the photo's not displayed in Firefox and Netscape browsers.

The photo's are build in a table through php and assign the table of content to an div tag.

This assignment working in IE but firefox and Netscape the divtag innerHTML content not shown.

I try to find the solution about the problem. Not yet fixed problem.

Any one pls help me to solve the problem..

Thanks

Senthil Nathan N.S
Link to comment
https://forums.phpfreaks.com/topic/29388-hi-all/
Share on other sites

You'll need to show us some code to help us give you relevant solutions. The first thing you need to do is run some alerts or other tests to make sure that your HTTP requests are returning the values you think they are. Once you know that you are indeed getting the right values, we can help you make sure that your images are being created properly, and finally, that your HTML is properly being updated.
Link to comment
https://forums.phpfreaks.com/topic/29388-hi-all/#findComment-134784
Share on other sites

I checked the table content using alert and it's building fine. But it is not shown in the innerHTML of the div tag. I'm also showing some other related content used in div tag. All are shown fine except the photo's builded table.

The same codes are working fine in IE. But the photo display div tag only not working in Firefox and Netscape.

I try to assing photo builded table content with some more strings, the strings only assigned in the div tag innerHTML but the table of photo's not shown.

Please help me to solve the problem.

Thanks

Senthil Nathan N.S
Link to comment
https://forums.phpfreaks.com/topic/29388-hi-all/#findComment-134793
Share on other sites

//#======================================= Ajax function starts here =================================== #//

    function createXMLHttpRequest()
{
var ua;
if(window.XMLHttpRequest)
{
try
{
ua = new XMLHttpRequest();
if(ua.overrideMimeType)
{
                    ua.overrideMimeType('text/xml');
}
}
catch(e)
{
ua = false;
}
}
else if(window.ActiveXObject)
{
try
{
ua = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
ua = false;
}
}
return ua;
    }
   
    var req = createXMLHttpRequest();


//#-- Function used to show the member album
function funShowAlbum()
{
req.open('get','album_display.php',true);
req.onreadystatechange = handleResponse;
req.send(null);
}
//#-- end of function album display


    function handleResponse()
{
if(req.readyState == 4)
{

var response = req.responseText;
var update = new Array();
if(response.indexOf('||' != -1))
{
update = response.split('||');
document.getElementById("mainTable").style.display = "block";
if(update[1] != 'Error')
{
if((update[0] != 'undefined' && update[1] != 'undefined' && update[2] != 'undefined' && update[3] != 'undefined'  && update[5] != 'undefined')
|| (update[0] != undefined && update[1] != undefined && update[2] != undefined && update[3] != undefined  && update[5] != undefined))
{
document.getElementById("memAlbumDisplay1").style.display = "block";
document.getElementById("memAlbumDisplay1").style.visibility = "visible";
document.getElementById("memAlbumDisplay1").innerHTML = update[0];
document.getElementById("memNext").innerHTML = update[5];
document.getElementById("memAlbumPaging").innerHTML = update[1];
document.getElementById("memAlbumSortList").innerHTML = update[2];
document.getElementById("memAlbumDetails").innerHTML = update[3];
response = undefined;
}
else
{
window.location.href = "album_display.php";
response = undefined;
}
}
else
{
window.location.href = "upload_test.php";
response = undefined;
}
}

}
    }

//#======================================= End of Ajax function =================================== #//

I have used the above ajax function to show the photo's and some other content.

Go through the function and help me how to fix the problem.

Thanks

Senthil Nathan
Link to comment
https://forums.phpfreaks.com/topic/29388-hi-all/#findComment-134808
Share on other sites

I build the content in the php page using pipe symbol "||" for seperate the content. I had already used this symbol and it didnot affect the resultant of the ajax function.

I have try to using innerContentText the photo table content has been build the div tag innerHTML content.

But i have used to show the photo's in the div tag for innerHTML. i will try to trace where the problem arrives..

If any idea to solve the problem is more help to me

Thanks

Senthil Kumar N.S
Link to comment
https://forums.phpfreaks.com/topic/29388-hi-all/#findComment-134831
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.