Thank you very much, James. I got it working! :o)

Janet

 
 
-------Original Message-------
 
From: James Keeline
Date: 09/25/05 03:04:12
To: [email protected]
Subject: Re: [php-list] Opening a new Window with Javascript and PHP
variable
 
--- Amethyst <[EMAIL PROTECTED]> wrote:

> I'm currently opening a new window using the following:
> 
> <a href="#" onClick="MyWindow=window.open('directory/index.php','MyWindow2
,
> toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes
> resizable=yes,width=800,height=600'); return false;">
> 
> Is it possible to use a php variable for the page I wish to open in the
new
> window such as:
> 
> <a href="#" onClick="MyWindow=window.open('directory/index.php?id=$pageID'

> MyWindow2','toolbar=no,location=no,directories=no,status=no,menubar=no
> scrollbars=yes,resizable=yes,width=800,height=600'); return false;">
> 
> Any help is much appreciated.
> 
> Thank you
> 
> Janet


Since PHP is processed on the server and generates custom HTML, it can
handle
this sort of task by simply printing the line of HTML in double quotes with
your variable.  Alternatively you could use:

<a href="#" onClick="MyWindow=window.open('directory/index.php?id=<?=
$pageID
?>',
MyWindow2','toolbar=no,location=no,directories=no,status=no,menubar=no
scrollbars=yes,resizable=yes,width=800,height=600'); return false;">

James
_____


James D. Keeline
http://www.Keeline.com  http://www.Keeline.com/articles
http://Stratemeyer.org  http://www.Keeline.com/TSCollection

http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc.
Fall Semester Begins Sep 7 -- New Classes Start Every Few Weeks.


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 




YAHOO! GROUPS LINKS 

 Visit your group "php-list" on the web.
  
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 





 

[Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to