473,543 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

bigger image opens in new window within an existing javascript.

jp
bigger image opens in new window within an existing javascript.

I am working within a existing javascript.
see www.art4companies.nl and press kunstenaars than press any name to
see what I mean.

After clicking on the thumbnails it shows a bigger picture. I would
like to add the function, when clicked on the bigger image it will
open a new window showing the picture in a bigger size.

Thank in advance!!!

yours sincerely,

jp
Jul 23 '05 #1
1 2196
You'll need to open a new window, with the window.open() function.

<IMG SRC="smaller image.jpg" onClick="view() ;">

<script language="JavaS cript">

function view() {
imgsrc = '... address of current image to display ...';

// for example:
// imgsrc = 'big/pic'+id1+'.jpg' ;

viewwin = window.open(img src,'viewwin', 'width=400,heig ht=300');
viewwin.focus() ; // just in case it was already open
}
</script>

You'll need to think of a way to get the right source for an image. Also
window.open has more parameters. I suggest you look at a JavaScript
tutorial for how to open new windows.

good luck,
Vincent

jp wrote:
bigger image opens in new window within an existing javascript.

I am working within a existing javascript.
see www.art4companies.nl and press kunstenaars than press any name to
see what I mean.

After clicking on the thumbnails it shows a bigger picture. I would
like to add the function, when clicked on the bigger image it will
open a new window showing the picture in a bigger size.

Thank in advance!!!

yours sincerely,

jp


Jul 23 '05 #2

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

Similar topics

1
17713
by: Randell D. | last post by:
Folks, I want to create a popup for thumbnail images (jpg, png, gif) and wonder if I can create a popup that opens a new window whereby the image fits the new window 100%... I know I can have my Apache/PHP server do this, but my preference leans towards clientside javascript... Thus... can javascript calcuate the width/height of an image...
1
1788
by: Markus Seibold | last post by:
Hello NG, i have a picture galerie with thumbnails. I want to add JS functionality that opens a new window with an enlarged version of the image when the user clicks on the thumbnails picture. See the following URL for an example: http://www.faschingsclub-roettenbach.de/html/fotos/ferienprogramm2003.html What happens with my showLargeImage...
4
4911
by: Amir | last post by:
Hi, I'd like to know if it's possible to pass an image name (the IMG SRC attribute) from HREF element to a function that is activated by onClick event and creates a Web page. I have this HREF element: <A HREF onClick="showLargePicture()"><IMG HEIGHT=25 SRC="test01.jpg"></A>
3
3366
by: Becky Carter Hickman-Jones | last post by:
Hi, I have a simple script that opens an image in a new window which is sized to the image. The script is as follows: <a title="xxx" onclick="window.open('http://www..com/photos/xxx.jpg','height=xxx, width=xxx');return false" href="#">link text</a> This script works very well for my needs, however, in IE6, the resulting opened window has...
4
1928
by: shawn | last post by:
I have a simple script located here which loads different images when you click on some links. Everything works fine until you click on the last link which opens a popup window (zoom image). After you close this window and try to click on the different links they make the image dissappear. Does anyone know what I can do to get it to work...
1
2100
by: Aussie Rules | last post by:
Hi, I have an image button on my page, and I want to have a popup window open up when the user clicks the imagebutton, and if possible set the window configuration(ie no tool bar, etc) like javascript can. On the click event I have page.response.redirect ("page.aspx") but this simply opens the page in the same window. Thanks
9
2568
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo" runat="server"/> <asp:Label ID="CompanyPicture" runat="server"/> I have 2 links that open the windows to preview these images. The previewed...
4
5153
by: ameyas | last post by:
hi all, i am using an image which has image map and i provide the href action url. i have provided the url to open a pop up window like "javascript:window.open('www.google.com');" but on clicking the image, the page (main window) gets refreshed in the background the pop up opens as desired. is there a way to cancel the refreshing of...
15
5896
by: mistral | last post by:
I want find code for clickable thumbnails, when click on small picture, a big image will popup in new window, sized to fit picture. Same as standard javascript image previewer, but without using javascript. I want try do this with html only, that this work on browsers with javascript disabled. I tried the following, but it still require...
0
7410
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...
0
7593
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. ...
0
7744
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...
0
7691
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...
1
5276
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...
0
4896
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...
0
3392
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...
0
3392
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
639
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...

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.