lundi 2 mars 2015

js submitform() don't send post variables


I am trying to implement in my website a preview page of the profile of the users. This preview page simple load the forms variables and print a fake page of the profile displaying the variables at the actual values. The part of the code where I call the form is



<script type="text/javascript">
function submitForm(action)
{
document.getElementById('personal-information-form').action = action;
document.getElementById('personal-information-form').setAttribute("target", "_blank");
document.getElementById('personal-information-form').submit();
}

</script>
<li>
<h2>&nbsp;</h2>
<p><input type="submit" name="save-info" class="my-buttons" onclick="submitForm('<?php echo $prw_url ?>')" value="<?php _e('Preview' ,'Project'); ?>" />&nbsp;

<input type="submit" name="save-info" class="my-buttons" value="<?php _e('Save' ,'Project'); ?>" /></p>
</li>


If I run the code above locally, the preview page is perfectly visualized. Once I upload the code in the server the preview page does not load the post variables. Which kind of the problem if this? I have no idea where is the problem.





Aucun commentaire:

Enregistrer un commentaire