473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to trigger this Function in new window and new window ONLY?

2
Hi there, in this site I am working on, I have a scroll down menu in the HOME page where user select an option and then press the button next to it, to be redirected to the related page (which is password protected).

I would like this related page to open in a new Window, AND keep the HOME page unchanged.

I have an onClick function called "gox1" to load the related page. When I try to put "window.open" in the statement/definition of the "gox1" function (see below), it simply load the related page in the original window, replacing the Home page AND open up an empty new window at the same time, which is not what I want.

Codes shown below, any help on this will be much appreciated!!!

Expand|Select|Wrap|Line Numbers
  1.  
  2.   <form name="doublecombo">
  3.     <select name="ky" size="7" onChange="redirec(this.options.selectedIndex)" class="tablexx" target="_blank">
  4.     <option>Germany</option>
  5.     <option>USA</option>
  6.     </select>
  7.     <select name="stage" size="7" class="tablexx">
  8.       <option value="http://google.com">Luna</option>
  9.     </select>
  10.  
  11. <input type="button" name="test" value="Info"
  12. onClick="gox1()">
  13.  
  14. <script>
  15.  
  16. function gox1(){
  17. location=temp.options[temp.selectedIndex].value; window.open()
  18. }
  19.  
  20. </script>
  21. </form>
  22.  
  23.  
Jul 27 '10 #1
2 1152
chaarmann
785 Expert 512MB
You are manipulating the url-address of the current page with "location=...". But you should pass this address to the new page. (pass the address inside the brackets of window.open()) Read description of window.open() how to do.

This is a JavaScript question, not a a Java question, so it should be moved to the corresponding forum.
Jul 27 '10 #2
khw118
2
That solved my problem, thanks a lot for your help.

Sorry I mistakenly posted this as a Java question...
Jul 27 '10 #3

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

Similar topics

0
by: Steven Wu | last post by:
------=_NextPart_000_0168_01C35D9A.B3ECE760 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi: It seems to me that there is no trigger function in...
2
by: Jules Alberts | last post by:
Hello everyone, Several columns in sereval tables in my DB should always be lowercase. I now have a simple function: create or replace function code_lower() returns trigger as ' begin...
0
by: Rajat Katyal | last post by:
----- Original Message ----- From: Rajat Katyal To: pgsql-jdbc@postgresql.org Sent: Saturday, January 31, 2004 10:15 AM Subject: Trigger function aborts the transaction on exception Hi:...
1
by: Rajat Katyal | last post by:
Hi: I came to know from the postgresql documentation that PostgreSQL does not have a very smart exception handling model. I wonder whether anyone can helpme or suggest some alternate solution for...
2
by: Karl O. Pinc | last post by:
I'm sure I saw something like this on the postgresql web site but the the search function is down in the documentation area. I'm unable to pass a function arguments in a CREATE TRIGGER...
5
by: Peter Erickson | last post by:
I am running postgresql 7.4.2 and having problems creating a trigger function properly. I keep getting the following error: ERROR: OLD used in query that is not in rule I have a table called...
0
by: Dennis Gearon | last post by:
If I have the following table: create table my_table( start TIME, end TIME ); and then I wanted a function as a trigger that would compare any INSERTS or UPDATES to see if there was any...
0
by: Bernard Cheung | last post by:
I am writing a trigger function. How can I know which fields are being updated in the PL/SQL function? For example I have a table here: CREATE TABLE COMPANY ( COMPANY_ID VARCHAR(10) NOT NULL,...
2
by: Reshmi Jacob | last post by:
Hello, Can any one help me in creating a trigger to update system date into a table while inserting a record into that table. I tried it like this, it is showing error !!! The following error...
1
by: djdevx | last post by:
Dear all PostgreSQL xperts! Hi, I am newbie in PostgreSQL. I am currently developing an app that use PostgreSQL as a BackEnd Database. Now I am having problem with the function trigger since last...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.