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