473,769 Members | 3,383 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
19 2901

"Wouter" <laptop@_NOSPAM .com> wrote in message
news:42******** *************** @news.wanadoo.n l...
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

lol!
Jul 24 '05 #11
>>
The target main is needed by the forum. otherwise he dont cant login.


Why not?

I dont know ecactely why because its a phpbb forum and the code are
sometimes deficalt to read. But when i delete the target main i cant login
anymore.

Greets Wouter
Jul 24 '05 #12
Wouter wrote:
The target main is needed by the forum. otherwise he dont cant login.
Why not?

I dont know ecactely why because its a phpbb forum and the code are
sometimes deficalt to read. But when i delete the target main i cant login
anymore.


We're not getting anywhere here, do you have an online URL demonstrating
the problem? Without reproducing the steps and undertanding the issue
it's hard to give you correct advice.

Currently, what we have is:
- you have a popup that is opened in result of the form submission,
while you would like to not have any popup,
- this behavior is probably due to the target attribute of the FORM,
which points to something called "main" - since you don't have any frame
called "main" it opens a popup,
- if there's no target the login does not work - what happens here, what
do you mean by "can't login anymore"? Do you have any error message?
Thanks,
Yep.
Jul 24 '05 #13
> We're not getting anywhere here, do you have an online URL demonstrating
the problem? Without reproducing the steps and undertanding the issue it's
hard to give you correct advice.

Currently, what we have is:
- you have a popup that is opened in result of the form submission, while
you would like to not have any popup,
- this behavior is probably due to the target attribute of the FORM, which
points to something called "main" - since you don't have any frame called
"main" it opens a popup,
- if there's no target the login does not work - what happens here, what
do you mean by "can't login anymore"? Do you have any error message?


Yes you can see it online.

check: http://webshop.addrenaline.com/conte...en/algemeen/0/
if you want to login you can use as pass and login: usenet

Greets Wouter
Jul 24 '05 #14
Wouter wrote:
check: http://webshop.addrenaline.com/conte...en/algemeen/0/
if you want to login you can use as pass and login: usenet


Thanks this is clearer now.

The approach in your page is dependent on javascript, which means that
if your user does not have javascript activated, it will fail. Moreover,
it's dependent on popups, which may be blocked by popup blockers.
Therefore, if you have the chance, I suggest you drop the popup thing
and include the login/password fields directly in the main page.

Now, if you want to keep this popup approach, then update the main file
and the popup file with the following patterns.
--- main file ---
<script type="text/javascript">
self.name="main ";
</script>

<a href="login.htm l"
target="popup"
onclick="loginP opup=window.ope n(this.href, this.target)">L ogin</a>
---
--- popup file ---
<form action="doLogin .html"
target="main"
onsubmit="setTi meout(function( ){window.close( )},1);return true">
<input type="submit">
</form>
---
HTH,
Yep.
Jul 24 '05 #15

"Yann-Erwan Perio" <ye*@invalid.co m> schreef in bericht
news:42******** *************** @news.free.fr.. .
Wouter wrote:
check: http://webshop.addrenaline.com/conte...en/algemeen/0/
if you want to login you can use as pass and login: usenet
Thanks this is clearer now.

The approach in your page is dependent on javascript, which means that if
your user does not have javascript activated, it will fail. Moreover, it's
dependent on popups, which may be blocked by popup blockers. Therefore, if
you have the chance, I suggest you drop the popup thing and include the
login/password fields directly in the main page.


Thats a good point i dont think about that! But when i include the
login/pass fields in de main site then i have a other problem that i need to
close the window where the user enter his login/pass....
I think i most go to learn mutvh better javascript! :) I think i will try to
make this but the javascript is again a problem i think because i dont know
how i close a window behind...
Now, if you want to keep this popup approach, then update the main file
and the popup file with the following patterns.
Thx for the code! But i will first to try to get everything on the main page
:)

HTH,
Yep.


Greets Wouter
Jul 24 '05 #16
Now, if you want to keep this popup approach, then update the main file
and the popup file with the following patterns.

Thx for the code! But i will first to try to get everything on the main
page :)


I have make fast a login on the main page and it works fine only when i
close the window i get a messages i i'm sure i want to close the window. So
thats why i want to know i it polibele whit javascript to send a form whit a
target in the same window.

Greets Wouter
Jul 24 '05 #17
Wouter wrote:
I have make fast a login on the main page and it works fine only when i
close the window i get a messages i i'm sure i want to close the window.
This is a security feature, you can only close a window that you have
opened, not the main window.
So
thats why i want to know i it polibele whit javascript to send a form whit a
target in the same window.


If everything is on the main window, then you don't need any target
anymore, just remove the window.name stuff and the target (or define it
to "_self") and this should work.

When working with specific issues it's always better to write a
dedicated test case, since you don't have to keep in view details
irrelevant to your test - if you have a hard time having it work, then
simplify your test case until you really just have the points you want
to validate.
HTH,
Yep.
Jul 24 '05 #18
Yann-Erwan Perio wrote:
If everything is on the main window, then you don't need any target
anymore, just remove the window.name stuff and the target (or define it
to "_self") and this should work.


And of course remove the self.close() call, since you're working with
one window you don't want to close it.
Cheers,
Yep.
Jul 24 '05 #19
If everything is on the main window, then you don't need any target
anymore, just remove the window.name stuff and the target (or define it to
"_self") and this should work.


It look like that everything is on the main window. But the send the data to
/forum/login.php and after login he redirect to /forum/redirect.php and that
file checks from where the user wants to login and redirect him then to the
place where the user clicks login.

But the target needs PHPbb so i cant delete the target.

Greets Wouter
Jul 24 '05 #20

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

Similar topics

6
6194
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
2542
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
2156
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
13871
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
14173
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
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10210
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...
1
9990
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
9861
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
8869
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...
0
6672
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
5298
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...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.