K
Kamyk
Hello all!
I would like to open a new window with a picture after clicking on a
shrinked picture which is located on the main page. I want this new window
to be
exactly sized as original dimensions of this image.
Where is the error on the following code??? :
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
function rozmiar(rysuneczek,id)
{
obrazek=new Image()
obrazek.scr=rysuneczek
if (id==1)
{
//rozmiar=obrazek.width
}
else
{
rozmiar=obrazek.height
}
}
function funkcja(rysunek)
{
oknoObrazka=window.open(rysunek,'oknoObr','toolbar=yes,location=yes,scrollba
rs=yes,width=' + rozmiar(rysunek,1) + ',height=' + rozmiar(rysunek,2))
oknoObrazka.focus()
}
</SCRIPT>
......
<a href="javascript:funkcja('WojtStol_files/meble/100_0135.gif');"><img
src="WojtStol_files/meble/100_0136.gif" width=150 height=100 border=1></a>
......
Thanks for help
Marcin from Poland
I would like to open a new window with a picture after clicking on a
shrinked picture which is located on the main page. I want this new window
to be
exactly sized as original dimensions of this image.
Where is the error on the following code??? :
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
function rozmiar(rysuneczek,id)
{
obrazek=new Image()
obrazek.scr=rysuneczek
if (id==1)
{
//rozmiar=obrazek.width
}
else
{
rozmiar=obrazek.height
}
}
function funkcja(rysunek)
{
oknoObrazka=window.open(rysunek,'oknoObr','toolbar=yes,location=yes,scrollba
rs=yes,width=' + rozmiar(rysunek,1) + ',height=' + rozmiar(rysunek,2))
oknoObrazka.focus()
}
</SCRIPT>
......
<a href="javascript:funkcja('WojtStol_files/meble/100_0135.gif');"><img
src="WojtStol_files/meble/100_0136.gif" width=150 height=100 border=1></a>
......
Thanks for help
Marcin from Poland