Hello everyone!!It's my first thread
Please,could anyone help me?I'm going crazy...
I've made a HTML page: I have one small picture in it and I'd like opening it (after clicking on it) in a popup whose size is the one of the picture.
I've found the following JavaScript: the problem is that it perfectly works in local (before uploading my page to my remote server) and the popup opens regularly. When I upload my page to my remote server, the popup doesn't open!!! I really can't find the reason!!!
Thanks to all the people who will be so kind as to help me...
Bye!!
PS: I use Dreamweaver MX
I've put between the <head> the following:
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
<SCRIPT LANGUAGE="JavaScript1.2">
var finestra;
var undef;
var x0,y0,titolo;
function popup(wid,hei,immagine,titolo) {
if (typeof finestra != "undefined") finestra.close();
x0 = Math.floor((screen.width - wid) / 2);
y0 = Math.floor((screen.height - hei) / 2);
finestra = window.open("","","width=" + wid + " ,height=" + hei +
" ,left=" + x0 + ",top=" + y0);
finestra.document.write("<IMG SRC=http://www.webdeveloper.com/forum/archive/index.php/" + immagine + " WIDTH=" + wid + " HEIGHT=" +
hei + " BORDER='0' STYLE='position:absolute; left:0px; top:0px'>");
finestra.document.title = titolo;
}
function chiudi() {
if (typeof finestra != "undefined") {
finestra.close();
finestra = undef;
}
}
</SCRIPT>
Then, I've put this code inside the body of my HTML page:
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"javascript:" onClick="popup(400,300,'bigpicture.jpg','Titolo')"><img src=http://www.webdeveloper.com/forum/archive/index.php/"smallpicture.jpg" alt="" width="40" height="30" border="0"></A>
At the end,after closing the body:
<script language="JavaScript">
<!--
window.open = SymRealWinOpen;
//-->
</script>
Please,could anyone help me?I'm going crazy...
I've made a HTML page: I have one small picture in it and I'd like opening it (after clicking on it) in a popup whose size is the one of the picture.
I've found the following JavaScript: the problem is that it perfectly works in local (before uploading my page to my remote server) and the popup opens regularly. When I upload my page to my remote server, the popup doesn't open!!! I really can't find the reason!!!
Thanks to all the people who will be so kind as to help me...
Bye!!
PS: I use Dreamweaver MX
I've put between the <head> the following:
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
<SCRIPT LANGUAGE="JavaScript1.2">
var finestra;
var undef;
var x0,y0,titolo;
function popup(wid,hei,immagine,titolo) {
if (typeof finestra != "undefined") finestra.close();
x0 = Math.floor((screen.width - wid) / 2);
y0 = Math.floor((screen.height - hei) / 2);
finestra = window.open("","","width=" + wid + " ,height=" + hei +
" ,left=" + x0 + ",top=" + y0);
finestra.document.write("<IMG SRC=http://www.webdeveloper.com/forum/archive/index.php/" + immagine + " WIDTH=" + wid + " HEIGHT=" +
hei + " BORDER='0' STYLE='position:absolute; left:0px; top:0px'>");
finestra.document.title = titolo;
}
function chiudi() {
if (typeof finestra != "undefined") {
finestra.close();
finestra = undef;
}
}
</SCRIPT>
Then, I've put this code inside the body of my HTML page:
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"javascript:" onClick="popup(400,300,'bigpicture.jpg','Titolo')"><img src=http://www.webdeveloper.com/forum/archive/index.php/"smallpicture.jpg" alt="" width="40" height="30" border="0"></A>
At the end,after closing the body:
<script language="JavaScript">
<!--
window.open = SymRealWinOpen;
//-->
</script>