upload

Reply

Join Date: Mar 2008
Posts: 145
Reputation: queenc is an unknown quantity at this point 
Solved Threads: 4
queenc's Avatar
queenc queenc is offline Offline
Junior Poster

upload

 
0
  #1
Oct 24th, 2008
hi
i want to upload photos.
i have a upload button when the upload button is clicked a window will pop out and uploading image option are there.
when the close window buttton is clicked in the pop up,i want to close the pop up and the path should be displayed as a link in the parent window
this is my code.where uploading is working but i am not able to close the window when close button is clicked and dont know how to display the link in the parent page......

child window
  1. <?
  2. echo '<script language="javascript">';
  3. echo 'function updateparent(path,button) {';
  4. echo 'window.opener.document.stylist_reg_details.'.$_REQUEST['textbox'].".value=path;";
  5. echo 'var targ="link_'.$_REQUEST['textbox'].'";var obj_styphoto = window.opener.document.getElementById("targ");';
  6. echo 'alert ("Target = " + targ);';
  7. echo 'alert (obj_styphoto);';
  8. echo 'obj_styphoto.href=path; obj_styphoto.style.display = "block";';
  9. echo 'window.close();';
  10. echo '}</script>';
  11. ?>
parent window
  1. workphoto1:<input type="text" readonly="readonly" name="workphoto1" class="story" size="35" />&nbsp;<INPUT type="button" value="Upload" onClick="alert('we support only JPG format');window.open('uploadpicture.php?stylistid=<?echo $stylistid;?>&textbox=workphoto1','mywindow','width=500,height=300')" />
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 145
Reputation: queenc is an unknown quantity at this point 
Solved Threads: 4
queenc's Avatar
queenc queenc is offline Offline
Junior Poster

Re: upload

 
0
  #2
Oct 24th, 2008
child window
<form action="uploadpicture.php?stylistid=<?echo $_REQUEST['stylistid'];?>&textbox=<?echo $_REQUEST['textbox'];?>" method="post" ENCTYPE="multipart/form-data">
File: <input type="file" name="stylistphoto" size="30">
<input type="submit" value="Upload!">
</form>
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 7
Reputation: BrettH is an unknown quantity at this point 
Solved Threads: 1
BrettH's Avatar
BrettH BrettH is offline Offline
Newbie Poster

Re: upload

 
0
  #3
Oct 24th, 2008
when the close window buttton is clicked in the pop up,i want to close the pop up and the path should be displayed as a link in the parent window
What do you mean by "Path should be displayed as a link to the parent window" do you mean if you hover the mouse over the link that it shows the URL? That would be taken care of as a "title" tag in the anchor tag.
Interested in Surfing? Check out World Surf Engine.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC