Jump to content

bluebutterflyofyourmind

Members
  • Posts

    113
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bluebutterflyofyourmind's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey there. so i've tried my hardest to figure out this problem on my own but haven't been able to. I beg anyone with info for help. I have two galleries of photos, and a drop down beside each photo allowing users to move a photo between galleries. When the drop down is changed submitGalChange() is called //submit gallery change for a given image function submitGalChange(imageID,dropDownID,oldGal){ dropDown = document.getElementById(dropDownID); targetGallery=dropDown.value; //call movephoto httpObject = new getHTTPObject(); if(httpObject != null){ httpObject.open("GET","movePhoto.php?newGallery="+targetGallery+"&imageID="+imageID, true); httpObject.send(null); httpObject.onreadystatechange = function(){updateGallery(targetGallery,oldGal);} } } after the move photo php script is called (which works fine) the function updateGallery() is called onreadyStageChange function updateGallery(newGallery,oldGallery){ if(httpObject.readyState == 4){ toggleGallery(newGallery); toggleGallery(oldGallery); } } this is just meant to check if ready state is at 4 before refreshing the desired galleries. the galleries are refreshed with toggleGallery() //toggle gallery display of a specific gallery function toggleGallery(name){ spanID = document.getElementById(name); checkboxID = name + "ID"; checkID = document.getElementById(checkboxID) httpObject = new getHTTPObject(); if(checkID.checked == true){ if(httpObject != null){ httpObject.open("GET","updateGallery.php?galleryName="+name, true); httpObject.send(null); httpObject.onreadystatechange = function(){setOutput(name);} } } else{ spanID.innerHTML = ""; } } My issue some that the second time the toggle gallery is called from updateGallery() it gets stuck at readystate 1. I've found though that if i insert alerts into the updateGallery() the script works as desired leading me to believe that this is giving the toggle gallery script time to complete before initiating the second one. how can i call this function multiple times with out running into this problem? thank you for any help!! oh and the setOutput function is this //set output span of given page function setOutput(id){ var output = document.getElementById(id); if(httpObject.readyState == 4){ output.innerHTML = httpObject.responseText; } else if(httpObject.readyState == 3){ output.innerHTML = "readystate = 3"; } else if(httpObject.readyState == 2){ output.innerHTML = "readystate = 2"; } else if(httpObject.readyState == 1){ output.innerHTML = "readystate = 1"; } else if(httpObject.readyState == 0){ output.innerHTML = "readystate = 0"; } else{ output.innerHTML = "<img src=\"images/waiting.gif\"/>"; } } once again any help greatly appreciated!
  2. as i see now....don't submit multiple threads on the same topic. bump the old one up if you still need help.
  3. you can echo javascript code along with your other stuff you're sending back. use this javascript code to modify the second div. that might help. are you sending back all the information at once?
  4. Hey there. so i did do a search for this in this forum but was unable to find what i was looking for. if someone know's of a pre-existing thread kindly point me to it. my problem is this... I'd like to take images that have already been uploaded and move them to another directory on the same server. i have folders which pertain to specific galleries, so when a user changes the gallery that an image belongs to, i'd like to move that file to the appropriate gallery folder on the server. is there a function that I can use to move this file? any help greatly appreciated! thanks. grant
  5. but how does one get the actual drag and drop visuals? how do you create a block to drag? ohhhh soooo many questions
  6. Does anybody know how to use php, mysql, AJAX and all that to create a drag and drop interface? I've seen many newer sites doing it but have no idea how they achieve that interface. any enlightenment? thanks! grant
  7. you hav eot submit your form to an iframe. if you just google "ajak file upload" you'll get a ton of tutorials
  8. if you want someone to create this for you head over to the freelancing forum. if you actually want some help, try it first yourself, post some code if you're having problems. if you have tried already and can't get it working, post some code and i'm sure people will be happy to help you. cheers.
  9. hm that sucks.  so it's NOT a problem having to do with the imagecopyjpeg() function?  is that what you used as well?
  10. yikes.  really?  crazy.  i tried it on two different hosts and i'm allowing up to 40 MB uploads.  just run into problems with large dimensions.  does this memory limit have to do with file size or other factors?
  11. here ya go.  just go here and download. [url=http://grantlucas.com/flower_Version2.jpg]http://grantlucas.com/flower_Version2.jpg[/url] i tried on another server i rent from and i got the same problem.  deffinately thinking it's the pixel dimensions that are messing things up.
×
×
  • 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.