A
Annette Block
I'm rather new in JavaScript, but I have some experience in php.
I learned it's rather easy to open a window of a specified size with
JavaScript, that you need to specify the opened file, but I don't see
how to do that in php.
The file I want to open is "detail.php?item=$item". This generates a
query, which results in a table of at most 5x3 items. I want a window
size that is of an appropriate size. I tried:
<HEAD>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
function NewWindow() {
window.open("detail.php?item=$item", "new", "width=500, height=300");
}
//-->
</SCRIPT>
- - - -
</HEAD>
and as hyperlink
<A HREF="detail.php?item=$item" TARGET="new" onClick="NewWindow();
return false;">details</A>
As a matter of fact I tried in the header more than just the example
shown, but no result. With this I came closest, getting a message that
my SQL syntax was wrong. Which isn't.
I also tried setting the window size within the details.php. But then
all windows became of the same size.
I know that php is server-side and JavaScript is client-side.
Any help or hint will be appreciated.
Annette
I learned it's rather easy to open a window of a specified size with
JavaScript, that you need to specify the opened file, but I don't see
how to do that in php.
The file I want to open is "detail.php?item=$item". This generates a
query, which results in a table of at most 5x3 items. I want a window
size that is of an appropriate size. I tried:
<HEAD>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
function NewWindow() {
window.open("detail.php?item=$item", "new", "width=500, height=300");
}
//-->
</SCRIPT>
- - - -
</HEAD>
and as hyperlink
<A HREF="detail.php?item=$item" TARGET="new" onClick="NewWindow();
return false;">details</A>
As a matter of fact I tried in the header more than just the example
shown, but no result. With this I came closest, getting a message that
my SQL syntax was wrong. Which isn't.
I also tried setting the window size within the details.php. But then
all windows became of the same size.
I know that php is server-side and JavaScript is client-side.
Any help or hint will be appreciated.
Annette