Solved

FORM submit in the same window and <BASE Target="_blank">

Posted on 2003-10-30
3
5,183 Views
Last Modified: 2012-05-04
I have a webpage with lots of links which should open in new windows. I add <BASE Target="_blank"> to avoid inserting  Target="_blank"  in each "<A HREF" tag. But now a search :
   <form action="cgi-bin/search.pl" method="GET">
      <input type="text">
      <INPUT TYPE="submit" value="Search">
   </form>
will also open in a new window. How can I avoid that a new window opens if I click on this submit button?

Thank you, Ben
0
Comment
Question by:bengore
3 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 220 total points
ID: 9648695
add target="_self" to the form-tag

<form action="cgi-bin/search.pl" method="GET" target="_self">
0
 
LVL 14

Assisted Solution

by:Renante Entera
Renante Entera earned 30 total points
ID: 9648709
Hello there!

I had an advice for you.  You better disable your submit button once it is click to avoid multiple submit to happen.

So instead of this line :

    <form action="cgi-bin/search.pl" method="GET"> and <input type="submit" value="Search">

Replace it with :

    <form name="form1" action="cgi-bin/search.pl" method="GET" OnSubmit="return DisableSubmit();">
    and
    <input type="submit" name="Search" value="Search">

Then here is the javascript function for DisableSubmit() :
<script>
  function DisableSubmit()
  {
    document.form1.Search.disabled = true;
    return true;
  }
</script>

Goodluck !
eNTRANCE2002 :-)
0
 

Author Comment

by:bengore
ID: 9648866
Thank you for your help (and the advice)!
Ben
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question