473,320 Members | 1,766 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,320 software developers and data experts.

onClick image to open in new window

I have the following code:

//This is at the top before the </head> tag
<script>
goLocations = new Array(
"#",
"first_option.doc",
"second_option.doc",
"#" );
</script>

<form name="reviews">
<table border="0" cellpadding="0">
<tr>
<td> Export as:
<select name = "nextLoc">
<option value="0" selected>
-- Please
select an action --</option>
<option value="1">First Option</option>
<option value="2">Second Option</option>
</select>
</td>
<td>
<img src="../../images/go.gif" alt="Go" width="21"
height="20" border="0" valign="bottom" style="cursor:pointer"
onClick="location.href=goLocations[document.reviews.nextLoc.value]"
type="image"></td>
</td>
</tr>
</table>
</form>

----------------------------

When the user clicks on the image (a GO button), I want the .doc files
to open in a new window. Currently they open in the same window.

Any help would be appreciated! Thank you.

Mar 8 '06 #1
1 2809
Nevermind... figured it out... simple... DUH. =)

Mar 8 '06 #2

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

Similar topics

2
by: Graham J | last post by:
Hello, Apologies for the somewhat wordy and garbled subject as I couldn't think how to phrase it and this has hindered my searching for any previous answers. It could be a really simple...
5
by: Spank | last post by:
Hello, I have a thumbnail image with the onclick event. When clicked, a larger pic is displayed via a javascript funtion. When browsing the page, the client does not realize the image is...
2
by: Kimmo R. M. Hovi | last post by:
Currently I have defined: -- clip clip -- <form method="post" action="xx" enctype="application/x-www-form-urlencoded"> <input type="image" name="Function 1" src="image1.gif" border="0"...
5
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code...
17
by: Mike Gratee | last post by:
Is it possible to use JavaScript to cause the browser to click a link on a page and have the browser act exactly like the user had clicked on the link directly? In other words, I need to...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
3
by: Jason Chan | last post by:
I create a webpage contain a table of thumbnails (around 30). Since the thumbnails is generated on the fly, it take some time to load all of them, around 15s. On each image, I have a onClick...
2
by: deergregoryd | last post by:
I've got some PHP and javascript working together to create a marginless image popup from another arbitrary image. This works perfectly in Firefox, but IE bombs and I'm not really knowledgable...
5
by: Magician | last post by:
Hello. I am trying to set the onclick event for images through a function, but the event is triggered as soon the page loads, then will not work when the image is clicked. Can anyone suggest what...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.