Re: Apply the hyper link ( javascript functon ) with php

From: Date: Tue, 10 Oct 2006 14:37:08 +0000
Subject: Re: Apply the hyper link ( javascript functon ) with php
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-242904@lists.php.net to get a copy of this message
clive wrote: > >> Hello to you, >> >> php web page ( test.php ) : >> >> <script language="javascript" type="text/javascript"> >> <!-- >> function popup(page) >> { >> window.open(page,title, "height=100,width=100"); >> } >> // --> >> </script> >> >> <a href="javascript:popup('./<?php echo >> $dir?>/index.htm')"> Test </a> >> >> Result : "homepage error" >> >> Web Server error log : >> >> [Tue Oct 10 18:07:36 2006] [error] [client 202.108.22.70] File does not >> exist: /home/web/index.htm >> [Tue Oct 10 18:10:12 2006] [error] [client 61.135.145.217] File does not >> exist: /home/web/test2004.htm >> [Tue Oct 10 18:10:14 2006] [error] [client 61.135.145.217] File does not >> exist: /home/web/readme.htm >> >> Please help, thanks ! >> >> Edward. > > > does $dir have a value ? > > probably nothing to do with php, does your page work if there was no > php code in it and if you replaced > <?php echo $dir?> with a page url. > > and go through some tutorial on php !!! > I just modified the test.php again : <script language="javascript" type="text/javascript"> function popup(page,title) { window.open(page,title, "height=700,width=780"); } </script> <a href="javascript:popup('index.htm')"> Test </a> No any php var, it can open another windows, but no any display ( info ) with the windows : Only Location : javascript:popup('index.htm') Any more help ? Thanks ! Edward.

« previous php.general (#242904) next »