0

I am creating a dynamic web page where uploading images is one of its feature. I have a looping DIV where each DIV has its own images: show sample below...

<?php
  while($row=mysql_fetch_assoc($result)){
    $id=$row['id'];
    $path=$row['path'];
  ...
?>

<div class="img-container">
  <img src="<?php echo $path; ?>" />
  <button onclick="changeMe('<?php echo $id; ?>')">Change Photo</button>
</div>

...and i wanted the upload form be displayed in popup DIV. Is there anyone who could help me and give me the exact code for this because i am not so familiar on jquery and ajax. Where after processing the uploaded image the information will be sent back to the popup upload if it is successful or not. Any help for those who are knowledgable on this. Thanks!!

3
Contributors
2
Replies
6
Views
6 Years
Discussion Span
Last Post by mahavir123
0

You cab use a jquery plugin like uploadify and once you set its Div,
try to make adjustments to its style so that it fits your need.

http://www.uploadify.com/

note: the plugin will not make the div pop up rather will show it immediatly, just make changes to the style and it will work as you wish it to be

0

In changeMe js function by js open a popup window with the url and id to it as
window.open('changepic.php?id=12','pop1','width=600, height=500');
Then Use in php code receive it as $_GET and show it and, you can also change there.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.