Welcome Guest, Not a member yet? Register   Sign In
unwanted repeated upload
#3

[eluser]no-cost lab[/eluser]
thanks for the advice, code is below.
the problem:
whenever a user removes a file and clicks the "back" button,
another file is being deleted.

this is the form used to remove files:

Code:
<form name="remove_proj_form" method="post" action="<?= site_url("site_name/remove_proj")?>">
    <input type="hidden" name="selected_proj"/>
  </form>
  <form name="remove_img_form" method="post" action="<?= site_url("site_name/remove_img")?>">
    <input type="hidden" name="selected_img" />  
    <input type="hidden" name="selected_proj"/>
  </form>


this is the link that is removing a file:

Code:
<a href="[removed]remove_img(&lt;?=$i?&gt;,&lt;?=$project['project_id']?&gt;)" style="text-decoration:none">

this is the javascript called by the link above:
Code:
function remove_proj(proj)
{
  if (!confirm("Are you sure you want to remove this project?"))
    return;
  document.remove_proj_form.selected_proj.value = proj ;
  document.remove_proj_form.submit() ;
}

thanks again!

No Cost


Messages In This Thread
unwanted repeated upload - by El Forum - 07-21-2010, 10:12 AM
unwanted repeated upload - by El Forum - 07-21-2010, 10:19 AM
unwanted repeated upload - by El Forum - 07-21-2010, 11:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB