473,756 Members | 5,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is it possilble that a <form> dont open a new window

Hi,

I try to make when i send a <form> that he dont open a new window. Is there
someone who know how i can make this whit javascript ?

Greets Wouter
Jul 24 '05 #1
19 2899
Wouter wrote:

Hi,
I try to make when i send a <form> that he dont open a new window. Is there
someone who know how i can make this whit javascript ?


Generally a form does not open a new window when submitted, if it does
then you either have a "target" attribute in your form opening tag or a
"target" property defined in scripting - just remove it and the form
will be submitted in the current window, as you wish.
HTH,
Yep.
Jul 24 '05 #2
Wouter wrote:
I try to make when i send a <form> that he dont open a new window.
The default behavior of forms is to submit to the same window.
Is there someone who know how i can make this whit javascript ?


You don't need JavaScript to make the default happen. You have to take
explicit steps to change the behavior from the default.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #3
>
Generally a form does not open a new window when submitted, if it does
then you either have a "target" attribute in your form opening tag or a
"target" property defined in scripting - just remove it and the form will
be submitted in the current window, as you wish.


Sorry i forgot to say i need a target because the form is using for login a
forum

Greets Wouter
Jul 24 '05 #4
Wouter wrote:
Generally a form does not open a new window when submitted, if it does
then you either have a "target" attribute in your form opening tag or a
"target" property defined in scripting - just remove it and the form will
be submitted in the current window, as you wish.
Sorry i forgot to say i need a target because the form is using for login a
forum


If you mean that you have a popup window as entry point to your forum,
and want that the loaded form be in the main window, then try adding a
target="_top" in the login form, in the popup.

Otherwise could you post some code exemplifying your issue?
Thanks,
Yep.

Jul 24 '05 #5
Wouter wrote:
Sorry i forgot to say i need a target because the form is using for login
a forum


Why? The sole purpose of the target attribute is to determine which
window/frame the document will load in. It has no effect on what data is
sent to the server, so it can't be required because it is being used for a
login form.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #6
> Otherwise could you post some code exemplifying your issue?


I'm dont use a popup.

<FORM action="http://test.mydomain.c om/forum/login.php" method="post"
target="main">
<INPUT class="post" size="12" name="username" value="Username ">
<INPUT class="post" type="password" size="12" name="password"
value="Password ">
<input type="hidden" name="redirect" value="redirect .php?url=<?php echo
$url; ?>">
<INPUT class="text" type="checkbox" name="autologin "></td>
<input class="mainopti on" type="submit" value="Inloggen "
name="login">

Greets WOuter
Jul 24 '05 #7
Wouter wrote:
<FORM action="http://test.mydomain.c om/forum/login.php" method="post"
target="main"> <input type="hidden" name="redirect" value="redirect .php?url=<?php echo
$url; ?>">

I'm sorry I still cannot get the pattern you're using. Do you have
frames, as one could understand from "target=mai n"? What is the role of
the hidden control?

What happens if you remove target="main"? If you remove the input
type="hidden"?
Thanks,
Yep.
Jul 24 '05 #8
> I'm sorry I still cannot get the pattern you're using. Do you have frames,
as one could understand from "target=mai n"? What is the role of the hidden
control?
The target main is needed by the forum. otherwise he dont cant login.
What happens if you remove target="main"? If you remove the input
type="hidden"?


The hidden field does a redirect to page where the user login. otherwise he
will see the index of the forum

Greets Wouter
Jul 24 '05 #9
Wouter wrote:
I'm sorry I still cannot get the pattern you're using. Do you have
frames, as one could understand from "target=mai n"? What is the role of
the hidden control?


The target main is needed by the forum. otherwise he dont cant login.


Why not?

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6193
by: Michael Hamm | last post by:
Hi, I'm trying to write a <form> whihc will retrieve a Web page on another server. I have (essentially) this: <form action="http://cgi.cs.indiana.edu/~oracle/digest.cgi"> <input type="submit"><select name="N"> <option value="1234#1234-01">foo <option value="1010#1010-02">bar <option value="1001#1001-03">baz
2
2603
by: Keiron Waites | last post by:
I have the following code: <input type="text" name="search" class="search_top"> <a href="" onclick="window.location='search.inc.php'+document..search. value; return false;" class="search_top">go</a> What do I put within to access the value of the input field search so I can access it's value? Thanks,
3
12936
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input type=submit value='Done'> </form>
4
2541
by: Howard Jess | last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865), my form disappears from the HTML markup (below). To summarize: 1) In a <script> block in the <head> I create a form element (part of object/feature/bug detection). 2) There's a <form> element defined in the <body>, with the id 'theForm'. 3) The onload function tries to access that form, and also counts the total number of forms in the document. It fails to...
4
3728
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the </form> tag but Mozilla doesn't. Is there a way to supress the blank line? Thanks Rob www.rcp.ca
19
2154
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which reference should I use in order to find that?
5
13869
by: shotokan99 | last post by:
for instance i do have this element but i dont have a <form>: <input type="Text" name="myname" id="myname" size="30"...> then i have this link: echo'<a href="mypage.php?name='.$myname.'...>Save</a>'; i want that $myname will the value of myname textbox. something like this: $myname= <the value of the textbox>
10
14172
by: neverquit | last post by:
hi , Iam Nagesh,Begineer in using Ajax,well i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag iam able to get the response in the <div> tag in mozilla (im takingthe HTML response), <script> function confirm() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null)
0
10031
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9869
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9708
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.