Jump to content

2 problems: Firefox Ajax and IE div


GodSmurf

Recommended Posts

I have made the following:

http://www.sexpotato.co.uk/bujinantiques/admin/

 

My problems are as follows:

Using IE:

Find a product (if one isn't available add one) then Edit the gallery. There should be a close button in the top right, it isn't there but it is in Firefox. I have no idea why.

 

HTML:

 

<div id="gallery_update">

<div id="close">

    <a href="javascript:;" onClick="hideGallery();">

        <img src="../images/close.jpg" border="0" />

        </a>

    </div>

    <div id="gallery_updated"></div>

</div>

 

CSS for this is as such:

 

#close {

position: relative;

left: 100%;

margin-left: -7px;

margin-top: -10px;

height: 15px;

width: 17px;

}

 

Using Firefox:

As above (Find product, edit gallery, etc). Upload an image, then try to do anything. This stops everything working unless the page is refreshed... for me anyways.

 

Javascript that is being referenced are these:

 

function getGallery(prodId,action,imageId,count) {

var url = "include/gallery.inc.php?prod_id="+ prodId +

"&action="+ action +

"&image_id="+ imageId +

"&count="+ count;

request.open("GET", url, true);

request.onreadystatechange = updateGallery;

request.send(null);

}

function updateGallery() {

if(request.readyState == 4) {

if (request.status == 200) {

var response = request.responseText;

changeNavAdded();

document.getElementById("fullscreen").style.visibility = "visible";

document.getElementById("gallery_update").style.visibility = "visible";

document.getElementById("gallery_updated").innerHTML = response;

} else {

alert("status is " + request.status);

}

}

}

 

I have used an iFrame to upload an image and then whan the image has been uploaded the iFrame calls the function using top.getGallery(etc) but then the page stops working.. but only when using Firefox. When I use IE it all carries on fine.

 

I have no doubt there are better ways to have done everything on this page but this is my first attempt at AJAX and I think I've done pretty well considering I had no idea about any of it 2 days ago.

 

Thank you all for your time... I'm sure you could have used it better elsewhere...

 

Fitz

Link to comment
https://forums.phpfreaks.com/topic/71909-2-problems-firefox-ajax-and-ie-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.