Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-10-30
3
Medium Priority
?
5,192 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 880 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 120 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

618 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