473,700 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cannot use JavaScript open window functions to open a request page??

My problem is when the user click the submit button, it will launch another
new window for the request page. I want to confirm we cannot use JavaScript
open window functions to open a request page? The following page2.asp won't
output the value entered in page1.asp. However, if we do <form
action="page2.a sp" method="get" target="_blank" >, then it will open a new
window for the request page, instead of using the same window as page1.asp.
But I want to use JavaScript window.open() or window.showModa lDialog(),
seems like impossible?? If we use regular button (<input type="button".. .>),
then
we can use JavaScript open window, but this is not posting form. Right??
Please advise! Thanks!!

//page1.asp
<html>
<body>
<head>
<script type="text/javascript">
function openwindow()
{
var sReturn = window.showModa lDialog("page2. asp", document,
"dialogHeight:7 00px; dialogWidth:500 px;");
}
</script>
</head>
<body>
<form action="page2.a sp" method="get">
<P>First Name: <input type="text" name="fname">
<P>Last Name: <input type="text" name="lname">
<P><input type="submit" value="validate " onclick="openwi ndow()">
</form>
</body>
</html>

//page2.asp
<html>
<body>
<P>first name from page1.asp = <%= Request.QuerySt ring("fname") %>
<P>Last name from page1.asp = <%= Request.QuerySt ring("lname") %>
</body>
</html>

Jul 19 '05 #1
1 3346

I've never tried this, but I think if you create your target window through
javascript before the post event of your form goes off, you'll be loading
the result of your post in this newly created window.

You set the target attribute to "_blank", but you can also specify a
windows name in there, eg. "mywindow". So if you use JavaScript to create a
window with the name "mywindow" before you post your form, the browser will
probably use that window to display the forms result.

"Matt" <ma*******@hotm ail.com> wrote in message
news:us******** *****@TK2MSFTNG P10.phx.gbl...
My problem is when the user click the submit button, it will launch another new window for the request page. I want to confirm we cannot use JavaScript open window functions to open a request page? The following page2.asp won't output the value entered in page1.asp. However, if we do <form
action="page2.a sp" method="get" target="_blank" >, then it will open a new
window for the request page, instead of using the same window as page1.asp. But I want to use JavaScript window.open() or window.showModa lDialog(),
seems like impossible?? If we use regular button (<input type="button".. .>), then
we can use JavaScript open window, but this is not posting form. Right??
Please advise! Thanks!!

//page1.asp
<html>
<body>
<head>
<script type="text/javascript">
function openwindow()
{
var sReturn = window.showModa lDialog("page2. asp", document,
"dialogHeight:7 00px; dialogWidth:500 px;");
}
</script>
</head>
<body>
<form action="page2.a sp" method="get">
<P>First Name: <input type="text" name="fname">
<P>Last Name: <input type="text" name="lname">
<P><input type="submit" value="validate " onclick="openwi ndow()">
</form>
</body>
</html>

//page2.asp
<html>
<body>
<P>first name from page1.asp = <%= Request.QuerySt ring("fname") %>
<P>Last name from page1.asp = <%= Request.QuerySt ring("lname") %>
</body>
</html>

Jul 19 '05 #2

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

Similar topics

5
4924
by: rathnesh | last post by:
when using a web application which includes taking an asp page then going to another asp page and coming back to first page ...some times connection to iis gets terminated and page canot be displayed error comes ..this error does'nt comes on a particular page .please help me to solve this problem..
3
2301
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I need to: 1. Click a submit button on an asp page, calling another page that saves the contents of that form to a database and then displays
9
2111
by: Charlene Russ | last post by:
Learn on-line at your own in a user-centered format with plenty of interaction and personal attention. This is a basic level coursed designed to introduce the novice to intermediate computer user to the JavaScript language, and focuses on creating user interactivity on personal websites. This Object Oriented Language is known for creating a high level of interactivity with minimal coding, and is fairly simple to learn. We will begin...
3
2118
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code: Sub loadPage(sender As Object, e As System.EventArgs, pageURL as String)
4
2313
by: Brie_Manakul | last post by:
I need to set up an if else to show different weather scripts based on the city selection they choose. Any help on this would be great. Thanks! <%@ page language="java" import="java.util.*, java.text.* " %> <%@ page import="com.plumtree.remote.portlet.*" %> <%@ page import="com.plumtree.remote.prc.*" %> <% String path = request.getContextPath();
3
2094
by: anthonybrough | last post by:
I have an asp page that has a form to collect user data in a form. when the user clicks submit the input is validated. If any fields are not acceptable the user clicks on a button to go back to the original form to correct the input. This all works fine until I try to incorporate a javascript to display a popup calendar which posts the selected date back to a field on the form. This script works fine in itself, however if the page is...
4
8278
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my problems and this one is really getting to me... I have a page that allows you to Browse Authors. There are three drop down boxes that auto-populate via AJAX. I have a file which it calls and returns the dynamically built XML file in the boxes...
1
3189
by: wenijah | last post by:
Hi everyone! First thank you for reading this post and yes, you probably already see that kind of topic title somewhere but the problem I've got today might be different than the 100 topics I've seen so far that did not resolve my problem... Environment and problem: I have a page A with Ajax.js and a <div id="ajx">Content</div> that changes when clicking on a link. Another page, page B, gets loaded into page A and (tries) to load a...
5
2687
by: loveshack | last post by:
Can anyone help me please (i am quite a novice, but having fun learning). Im not sure if this is an ASP problem, a javascript problem or a browser problem. Firstly, everything i have written works fine in IE7 and beta IE8. My pages do not work however in Safari or Firefox, and please dont beat me, but i use Frontpage to write my site, and i use iframes as ive not discovered how to do this any differently! So the issue is this, i have a...
0
8644
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
9074
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
8970
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
8924
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
5902
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
4403
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
3088
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
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2027
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.