473,769 Members | 6,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.d oc",
"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">Secon d Option</option>
</select>
</td>
<td>
<img src="../../images/go.gif" alt="Go" width="21"
height="20" border="0" valign="bottom" style="cursor:p ointer"
onClick="locati on.href=goLocat ions[document.review s.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 2823
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
1857
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 question. Anyway... I have a simple javascript function that opens up a new window and writes HTML code in it to display an image (I don't just display the image because of problems with different margins in different browsers). Nothing exotic there. ...
5
1553
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 clickable because the arrow your mouse displays as you browse from page to page, does not transform to the pointer--something that natuarally happens when you hover over a hyperlink. How may I provide this functionality? Thanks,
2
5789
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" title="1">
5
10886
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 works fine if I click to open in > the same window, but if I click the browser option to open in a > new window, the new window tries to open the href URL (the > onClick function does get executed, but seems to be ignored). > ...
17
61444
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 programmatically issue a JavaScript statement which causes the browser to act just like the user clicked on a link in my page. And if that link has an onClick JS event defined, I'd want that onClick event to execute too, exactly the same as if the user...
2
9179
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 in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the
3
2987
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 listener to open the larger version of thumbnail in a popup window. If I click one of image when the page is still downloading the remaining, the popup open but the opener window stop download the remaining. Is it a normal behavior or I can do...
2
3037
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 about Javascript to be able to tell immediately why. Here's the relevant code from the page: <a href="#" onClick="window.open('http://www.somesite.com/popup.php?image=popup.jpg', 'popup', 'width=737,height=492, directories=no, location=no,...
5
2107
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 is wrong? It is happening in both IE6 and Firefox --------------------------------------------------------------------------- window.onload = fnNewWindowLinks; function fnNewWindowLinks() { for (var intLinks=0; intLinks<document.links.length;...
0
9423
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
10211
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
10045
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
7409
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
5299
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
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
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.