Solved

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

Posted on 2003-10-30
3
5,187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

688 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