Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2004, 08:30 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems width userviewer ch.12

I'm one of the lot of readers who have problems width the example in PHP4: userviewer.php.
I have tried all the changes I could find ind this forum, but the rësult is: When I select: View Record there just open a copy of the same window.
My changes is:
New scriptcode:
NEW_WIN = window.open ("", "RecordViewer","toolbar=no,width=<?php echo $new_win_width ?>,height=<?php echo $new_win_height?>,directories=no,status=no,scrollb ars=yes,resize=no,menubar=no");


Changes in the the link in the userviewer.php:
<A HREF=\"javascript:window.open('$PHP_SELF?action=vi ew_record&userid=$userid');\">View Record</A></TD>\n";

In the botton of the code:
Added:
if (!isset($_GET['action']))
$action=$_Get['action'];
else $action='list_records';
if (!isset($_GET['userid']))
$userid=$_GET['userid'];
else $userid=null;

---but nothing seems to help.

Can anybody help us?

 
Old March 28th, 2005, 09:10 AM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you actually solved this problem yet? I have just come across an identical problem and have no idea of how to solve it? You're assistance would be greatly appreciated,
cheers


 
Old March 28th, 2005, 10:07 AM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:[i]Originally posted by Snib
This should work:

<A HREF=\"javascript:window.open('$PHP_SELF?action=vi ew_record&
        userid=$userid');\">View Record</A></TD>\n";

Maybe it would be easier if you just made a function called open_window().

Try adding this to your JavaScript code somewhere: (common_db.inc)

function open_window(url)
{
window.open(url,' ');
}

Let me know if this works.

Snib

P2P Member
<><


Thanks for that tip! I've been struggling for hours trying to make this work so I can keep turning pages in this intriguing php journey into databases and beyond!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp 12, common_db.inc & userviewer.php reques jaymax BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 February 1st, 2006 05:18 PM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM
Ch. 12 userviewer.php -> modify Tachyon BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 May 18th, 2004 12:38 PM
Chp 12 - userviewer.php problems w/ hyperlinks jaymax BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 July 10th, 2003 04:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.