473,811 Members | 3,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FAQ Topic - How do I POST a form to a new window? (2008-01-16)

-----------------------------------------------------------------------
FAQ Topic - How do I POST a form to a new window?
-----------------------------------------------------------------------

You use the target attribute on the form, opening a window with
that name and your feature string in the onsubmit handler of the
FORM.

<form ... action="..." target="wndname " onsubmit="windo w.open('',this. target,'feature s');return true;">

http://www.htmlhelp.com/reference/ht...orms/form.html
--
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javas cript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers. The sendings of these
daily posts are proficiently hosted by http://www.pair.com.

Jan 16 '08 #1
4 1419
FAQ server wrote:
-----------------------------------------------------------------------
FAQ Topic - How do I POST a form to a new window?
-----------------------------------------------------------------------

You use the target attribute on the form, opening a window with
that name and your feature string in the onsubmit handler of the
FORM.

<form ... action="..." target="wndname " onsubmit="windo w.open('',this. target,'feature s');return true;">

http://www.htmlhelp.com/reference/ht...orms/form.html

I've been trying to get this to open a new (i.e. separate) window but it
"always" opens a new tab in FF2 and IE7. So, I think, you should modify
the FAQ topic accordingly.

Andrew Poulos
Jan 16 '08 #2
Thomas 'PointedEars' Lahn wrote:
Andrew Poulos wrote:
>FAQ server wrote:
>>-----------------------------------------------------------------------
FAQ Topic - How do I POST a form to a new window?
-----------------------------------------------------------------------

You use the target attribute on the form, opening a window with
that name and your feature string in the onsubmit handler of the
FORM.

<form ... action="..." target="wndname " onsubmit="windo w.open('',this. target,'feature s');return true;">

I don't think `return true;' is necessary here. If the `submit' event is
not explicitly cancelled, the form is submitted.
>>http://www.htmlhelp.com/reference/ht...orms/form.html
I've been trying to get this to open a new (i.e. separate) window but it
"always" opens a new tab in FF2 and IE7. So, I think, you should modify
the FAQ topic accordingly.

Since there are many factors that influence whether a window or tab is
opened, that would be premature.
I built a test piece and its working??? That is, it is opening a new
window. I'm unsure why it wasn't working just yesterday. If I find
anything reproducible I'll post it.

Andrew Poulos
Jan 16 '08 #3
In comp.lang.javas cript message <47************ **@PointedEars. de>, Wed,
16 Jan 2008 03:07:34, Thomas 'PointedEars' Lahn <Po*********@we b.de>
posted:
>Andrew Poulos wrote:
>I've been trying to get this to open a new (i.e. separate) window but it
"always" opens a new tab in FF2 and IE7. So, I think, you should modify
the FAQ topic accordingly.

Since there are many factors that influence whether a window or tab is
opened, that would be premature.
A foolish remark. "How do I POST a form to a new window or tab?"
covers the situation. The subsequent text can deal with selection of
one or the other.

</FAQENTRY>
Why doesn't the onsubmit event handler get called then formRef.submit( )
is used?
<//FAQENTRY>

Too geeky. It will not attract the attention of those wanting the
answer to the original Subject question. OTOH, those who read it
carefully will notice that it's not semantically well-formed.

--
(c) John Stockton, Surrey, UK. ??*@merlyn.demo n.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQish topics, acronyms, & links.

Food expiry ambiguities: <URL:http://www.merlyn.demo n.co.uk/date2k-3.html#Food>
Jan 16 '08 #4
Dr J R Stockton wrote:
[...] Thomas 'PointedEars' Lahn [...] posted:
>Andrew Poulos wrote:
>>I've been trying to get this to open a new (i.e. separate) window but it
"always" opens a new tab in FF2 and IE7. So, I think, you should modify
the FAQ topic accordingly.
Since there are many factors that influence whether a window or tab is
opened, that would be premature.

A foolish remark.
It wasn't. Andrew observed a behavior that was not in accordance with the
FAQ, so it was necessary to make sure that the observed behavior was
reproducible before the FAQ was changed. Because nobody is perfect; well,
apart from Dr J R Stockton, of course ... (*HUALP*)
"How do I POST a form to a new window or tab?" covers the situation.
Nonsense.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8************ *******@news.de mon.co.uk>
Jan 17 '08 #5

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

Similar topics

6
3897
by: Matt | last post by:
Is it possible to post form data and open an invisible window? For example, in page1.as <form action="page2.asp" method="POST" It will post the form data from page1.asp to the server, and open page2.asp. But I dont want to make page2.asp invisible. Any ideas?? Is it possible? Please advise. Thanks!!
1
5280
by: humbads | last post by:
I am trying to get a popup window to work for editing notes in my application. Here's how I implemented it: The original frame is called ORIGINALFRAME and contains a link like this: <a href="javascript:launchwin();">Edit Note</a> function launchwin() { // ... custom stuff newNoteWindow = window.open(strURL,'NoteWindow',strOptions);
2
3870
by: gialby | last post by:
Ciao i have this problem.... i have a main asp page with this code PARENT PAGE <script language="vbScript"> function ricerca() finestra=window.open("ricerca.asp","","width=500,height=500,top=0,left=0,resizable=yes,scrollbars=yes")
10
10057
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to believe that this has to do with unreleased form component events or event handlers. I'm comparatively new to .net and windows forms, in the sense that though I've been using them for over 2 years now, it's been rather sporadic. I work with...
3
4226
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? ----------------------------------------------------------------------- When changing the status in an event (e.g. onmouseover) you should return true from the event. Also a number of browsers require a short delay before setting the status to overcome their default behaviour with the...
3
1394
by: toddw607 | last post by:
Hello All, I am using Access 2003 and when I view a report from a form and close the print preview window for the report to return to the form the form window shifts from being aligned to the upper left corner to the lower right corner of the DB window. Has anyone else had this problem? Any ideas on how to solve it. Thank you. -Todd
0
9730
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
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
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
10403
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
10136
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
9208
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
5555
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
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
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.