Jump to content

bluebutterflyofyourmind

Members
  • Posts

    113
  • Joined

  • Last visited

    Never

Everything posted by bluebutterflyofyourmind

  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.
  12. I am on shared hosting but i think i might have figured out some stuff so i tried my functions again with different images and it worked.... the image that failed was ont 500 kb but had dimension of about 3000x2500 i tried another image that was 1.5MB but on 2000x1900 and it worked. I think imagecopyfromjpeg() can't handel such large dimensions.  does this make sense?  is there a way around this? thanks! grant
  13. I have the same problem.  though this is happening on relatively small files. ie: <1MB  not sure how to fix this. neone?
  14. I've run into a similar issue and would really appreciate some help as well.
  15. javascript can be disabled but it is also much faster than sending the info to the server just to have it sent back when somethings wrong. pretty much you just have to use javascript and the onKeyup for the input field to trigger the javascript check. then don't let them submit the form until the various inputs match. when they match make submitbutton.disabled = false. (start it off true in your form) you should be able to find how to do that through google. pretty simple stuff. let me know if you have problems. I you want to still do it the php way, just take the values that they send to you and compare them. if they don't match return an error and don't continue with the registration script.
  16. do you want to confirm by just making sure that they are the same? if so you can easily do that with javascript before the form is submitted
  17. you can't upload a file through ajax in the traditional method. you have to pass everything to an iframe. I suggest googleing, AJAX file upload and looking at some of those tutorials
  18. Hey there. I currently have a form for a user to update news. I want to also have it so they can add an image. How can i get this file through the AJAX to my php script? thanks! -Grant
  19. depends on how you set up your ajax function. i'd say you should make a new AJAX function for each new request.
  20. excellent. not sure if anything i said helped but glad you got it working! do'nt forget to mark this topic as solved at the bottom of this thread. seee ya! -Grant
×
×
  • 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.