I am using prettypopin for the link on the index page to open
updatephoto.php. The index page also uses some other jQuery features.
I've included the jQuery in case you see something that may be wrong
or conflicting, and the HTML link tag.

Thanks
Pasquale

jQuery:
<SCRIPT type="text/javascript" src="/includes/jquery.js"></SCRIPT>
<SCRIPT type="text/javascript" src="/includes/uicore.js"></SCRIPT>
<SCRIPT type="text/javascript" src="/includes/uidrag-drop-sort.js"></
SCRIPT>
<SCRIPT type="text/javascript" src="/includes/uiaccordion.js"></
SCRIPT>
<SCRIPT type="text/javascript" src="/includes/jquery_pretty_popin.js"
charset="utf-8"></SCRIPT>
<SCRIPT type="text/javascript" src="/includes/jquery_multifile.js"></
SCRIPT>
<SCRIPT type="text/javascript">
$(document).ready(function() {
 $('#photolist').sortable({
  items: '> div',
  opacity: 0.7,
  revert: true,
  handle: 'img.handle',
  update: function () {
   var order = $('#photolist').sortable('serialize');
   $.get('sortphotos.php?'+order);
  }
 });

 $('#trash').droppable({
  accept: '#photolist div',
  tolerance: 'pointer',
  drop: function(event, ui) {
   var pidarray = ui.draggable.attr('id').split('_');
   $("#sortorder").load('deletephotos.php?pid='+pidarray[1]);
   $(ui.draggable).hide('slow', function() {
   $(this).remove();
   });
  }
 });

 $('#accordion').accordion({
  header: 'div.accordion_title',
  alwaysOpen: false,
  clearStyle: true,
  autoHeight: false
 });

 $("a[rel^='prettyPopin']").prettyPopin({
  modal : true,
  callback: function(){ window.location.reload(); }
 });

 $('#filemulti').MultiFile({
  STRING: {
   remove: '<img src="/includes/pics/bin.gif" height="16" width="16"
alt="x" />'
  }
 });

});
</SCRIPT>


HTML:
<A href="updatephoto.php?photo=headshot" rel="prettyPopin"><IMG
src="pics/hs2.jpg" class="border1" alt="" /></A>



On Feb 10, 6:38 am, Mike Alsup <mal...@gmail.com> wrote:
> On Feb 10, 12:04 am, spiderling <webmas...@spiderling.ca> wrote:
>
>
>
> > I am using prettyPopin lightbox for a file upload form, and I am also
> > using jQuery Form Plugin to upload the image file and update it
> > accordingly. Unfortunately, the file is not being sent. The $_FILES
> > array is empty. I've included the jQuery and HTML being used. If
> > someone can please look and let me know if I'm missing something,
> > because from all the examples I've seen it doesn't seem to require too
> > much to upload a file.
>
> > Thanks.
>
> > updatephoto.php jQuery:
> > $(document).ready(function() {
> >  var options = {
> >   target: '#divupdate',
> >   beforeSubmit : function() {
> >    $('#divupdate').html('<img src="pics/loader.gif" border="0"
> > alt="Please wait..." />');
> >   }
> >  };
>
> >  $('#phupdt').ajaxForm(options);
>
> > // $('#phupdt').submit(function() {
> > //  $(this).ajaxSubmit(options);
> > //  return false;
> > // });
>
> > });
>
> > updatephoto.php HTML:
> > <div id="divupdate">
> > <br /><br />
> > <form id="phupdt" action="updtphresponse.php" method="post"
> > enctype="multipart/form-data">
> > <input type="hidden" name="MAX_FILE_SIZE" value="5250000" />
> > <table>
> >  <tr>
> >   <td><input type="file" name="headshot" size="30" /></td>
> >  </tr>
> >  <tr>
> >   <td><input type="submit" name="request" value="Update photo" /></td>
> >  </tr>
> > </table>
> > </form>
> > </div>
>
> > updtphresponse.php HTML:
> > print_r($_FILES);
> > $html = '
> > <table>
> >  <tr>
> >   <td><b>Successfully updated.</b></td>
> >  </tr>
> > </table>
> > ';
> > echo $html;
>
> Everything you posted looks fine.  Where does the prettyPopin lightbox
> come into play?
>
> Mike

Reply via email to