Wrox - Beginning PHP4 Ch12 example problem
| From: | Dave Mateer | Date: | Mon, 16 Apr 2001 15:11:11 +0000 |
| Subject: | Wrox - Beginning PHP4 Ch12 example problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-48760@lists.php.net to get a copy of this message | ||
Happy Easter to all!
In the user viewer example at the end of Chapter 12 - has anyone had
problems with the source downloaded from their website?
The story so far with my trials of this example:
downloaded source
created table in mysql and populated it (with the SQL script provided)
First page ie function list_records() works 'fine'. Except a javascript
error at the foot of the page - page done, with errors. Sorting hyperlinks
all work, as does all the forward, reverse paging.
What doesn't work is the function view_record() hyperlinks.
I believe things are going awry in javascript (of which I know nothing, and
have the dummies guide in front of me) as it doesn't get to opening a new
window.
I've tried calling the function as follows:
<a href="javascript:open_window('www.google.com');">Google</a>
No joy at all - javascript error.
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function open_window(url) {
var NEW_WIN = null;
NEW_WIN = window.open ("", "RecordViewer",
"toolbar=no,width="+
<?php echo $new_win_width ?>+
",height="+<?php echo $new_win_height?>+
",directories=no,status=no,
scrollbars=yes,resize=no,menubar=no");
NEW_WIN.location.href = url;
}
//-->
</SCRIPT>
Any help greatly received. Grrrrrrr I'm trying to learn php, not hack
javascript...
David Mateer.
dave@interlynx.co.uk