473,770 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open Window with %

1 New Member
Hi,

I am trying to open one new window with some values.

The following is my code ..

<%@ page import="java.ut il.*" %>
<%@ page contentType="te xt/html; charset=x-SJIS" %>
<HTML>
<HEAD>
<META NAME="GENERATOR " Content="Micros oft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT LANGUAGE=javasc ript>
function openwindow1(){
strURL="test.js p?value1=welcom e&value2=25&val ue3=200";
handle=window.o pen(strURL,'tes t1','top=1,left =1,resizable=No , width=770,heigh t=690');
}
function openwindow2(){
strURL="test.js p?value1=welcom e%&value2=25&va lue3=200";
handle=window.o pen(strURL,'tes t2','top=1,left =1,resizable=No , width=770,heigh t=690');
}
</SCRIPT>
</HEAD>
<BODY>
<FORM action="" method=POST id=form1 name=form1 >
<%
System.out.prin tln("********** *************** *************** *");
System.out.prin tln("[Value - value1] :: " + request.getPara meter("value1") );
%>
<input type='button' value='test1' onclick='openwi ndow1()'>
<input type='button' value='test2' onclick='openwi ndow2()'>
</FORM>
<P>&nbsp;</P>
</BODY>
</HTML>

If I click on test1 button, value is coming correctly, but when I am clicking on second button, the value is not coming. null value is coming.
I am not getting, this is Java script problem or jsp problem.

Please check the same and get back to me, why I am getting like that output for changing the js value.
Jan 5 '07 #1
1 1947
b1randon
171 Recognized Expert New Member
Hi,

I am trying to open one new window with some values.

The following is my code ..

<%@ page import="java.ut il.*" %>
<%@ page contentType="te xt/html; charset=x-SJIS" %>
<HTML>
<HEAD>
<META NAME="GENERATOR " Content="Micros oft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT LANGUAGE=javasc ript>
function openwindow1(){
strURL="test.js p?value1=welcom e&value2=25&val ue3=200";
handle=window.o pen(strURL,'tes t1','top=1,left =1,resizable=No , width=770,heigh t=690');
}
function openwindow2(){
strURL="test.js p?value1=welcom e%&value2=25&va lue3=200";
handle=window.o pen(strURL,'tes t2','top=1,left =1,resizable=No , width=770,heigh t=690');
}
</SCRIPT>
</HEAD>
<BODY>
<FORM action="" method=POST id=form1 name=form1 >
<%
System.out.prin tln("********** *************** *************** *");
System.out.prin tln("[Value - value1] :: " + request.getPara meter("value1") );
%>
<input type='button' value='test1' onclick='openwi ndow1()'>
<input type='button' value='test2' onclick='openwi ndow2()'>
</FORM>
<P>&nbsp;</P>
</BODY>
</HTML>

If I click on test1 button, value is coming correctly, but when I am clicking on second button, the value is not coming. null value is coming.
I am not getting, this is Java script problem or jsp problem.

Please check the same and get back to me, why I am getting like that output for changing the js value.
Please paste the HTML/JS source not the JSP source. I can tell you if your JS is wrong when values are filled in, but I don't know what your JSP is going to fill in those blanks. You might even just see your problem in the HTML source. Give it a go.
Jan 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

18
8848
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page (same folder). The cookie is not received. Can someone explain why? I worked around this by adding a cache-control header with a value of no-cache. This fixes the problem. Unfortunately that causes another problem with Internet Explorer...
6
8225
by: Les | last post by:
Hi, I'd like to find out how to use the window.open() script in Fireworks MX. I have posted my question in the Fireworks forum but didn't get any replies. Since it's javascript, maybe someone could help me here...? I'd like to use the window.open() script to open a separate window, because I'd like to hide the menubar and specify the window size as well. So I specify "javascript:window.open(...)" as the HTML link for a hotspot. However,...
10
11240
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#" onClick="window.open('/cgi-bin/displayimage.cgi?/store/demo/image.jpg&YOUR+PRODUCT%27<b>S+NAME+GOES', 'fullimage', 'WIDTH=420,HEIGHT=405,status=0')"> The original window should not reload, but is, and I have tested it with both version 4.72 and 7.02, and they both do it. IE does not do it....
10
6759
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a new window with maximized dimensions!) FYI, I uploaded the same code to: http://tosasoft.com/test/open.htm ========================================
2
3509
by: Samir Pandey | last post by:
Hello, I am using the following javascript code to open a new window. Somehow, IE always opens a new window. It doesn't open target url in the window name given. All i want is, if there is a window "MyWin" already open, then the main window should load the target url in "MyWin" and not open a new window again.
3
24716
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The situation is: A main window opens child windows one at a time as the user requests, each with its own name. The user may click in any child window or the main window to open a summary window, which has a name all windows know. I want to get that...
2
4410
by: Larry R Harrison Jr | last post by:
I have pull-down menus in javascript and I have the code for opening a link in a new window. But I want it to open a full-sized window. I can't figure out the syntax. What I have so far: Menu5_5_1=new Array("'Lonely Church","javascript:window.open ('http://www.photo.net/photodb/photo?photo_id=2640310')","",0,20,300); That works fine, except I can't figure out how to modify it to make it open full-screen.
8
5657
by: Dominic Tocci | last post by:
I'm searching for a way to use window.open on my web page to open a window in firefox that allows the sidebars to work (bookmarks, history, etc). When I use the following: var popWindow=window.open('http://www.yahoo.com','','width=600,height=400,toolbar=1,location=1,menubar=1,resizable=1,titlebar=1,directories=1,status=1,scrollbars=1'); the sidebars are disabled. I click on the buttons for bookmarks and history and they do nothing. I...
7
3674
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses pageA.html 2. User clicks on menu link to open popup.html 3. pageA.html checks if popup.html is already open. It is not, open
13
3338
by: Geoff Fox | last post by:
I am in the final moments of designing a new website. One of the pages (http://www.auditionfactory.com/samples.php) has four links to show sample work. I would like these links to open new browser windows when clicked. I have found scripts that will allow one to open, and a few that claim to all multiples to be opened, but so far nothing that will allow a user to open multiple new windows as they click to see new samples. Does anyone...
0
9595
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
10232
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
9873
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
8891
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
7420
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
6682
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
5313
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
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3578
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.