Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Form Submission Opens New Tab/Window? [duplicate]

Tags:

html

Possible Duplicate:
submit a form in a new tab

How can i open a new window when i submit one form?

    <form method="post" action="<?php echo $PHP_SELF;?>">
    First Name:<input type="text" size="12" maxlength="12" name="Fname">:<br />
    Last Name:<input type="text" size="12" maxlength="36" name="Lname">:<br />
    <input type="submit">
    </form>
like image 497
New in php Avatar asked Dec 09 '12 09:12

New in php


People also ask

How do I stop form submit twice?

The disabled property was first introduced by Microsoft but has since been adopted as a standard by the W3C. So when the form is submitted - either by clicking on the submit button or pressing Enter in a text input field - the submit button will be disabled to prevent double-clicking.

How do I stop page refresh after submitting?

Use the preventDefault() method on the event object to prevent a page refresh on form submit in React, e.g. event. preventDefault() . The preventDefault method prevents the browser from issuing the default action which in the case of a form submission is to refresh the page.

Which attribute is used for the submitted form will open in a new tab or same window?

The <form> target Attribute in HTML is used to specify whether the submitted result will open in the current window, a new tab, or on a new frame ie., this attribute specifies a name or a keyword that shows where to display the reply, once the form is submitted.

How do you stop re submitting a form after clicking back button?

You can check if the user clicked the back button, disable form if true. Another way is by storing a cookie which you check on page load, if it exists you can disable the form.


1 Answers

you can use code like this

    <form action="#" method="post" target="_blank">
      ...
    </form>
like image 158
Sibiraj PR Avatar answered Nov 16 '22 02:11

Sibiraj PR