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!!

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.