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

From: Date: Mon, 09 Oct 2006 17:35:38 +0000
Subject: Re: Apply the hyper link ( javascript functon ) with php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-242853@lists.php.net to get a copy of this message
On Sun, October 8, 2006 6:53 pm, edwardspl@ita.org.mo wrote: > How to apply the following function with php ? > <a href=javascript:popup('index.htm')> Test </a> If you're new to PHP, be a minimalist, and pull out PHP only when you absolutely have to: <a href="javascript:popup('<?php echo $dir?>/index.htm')"> Test </a> Since $dir is the ONLY part you want to be changing, use PHP only for that part. Switching in/out of PHP like this is very fast/cheap, and leaves you with HTML that mostly looks just like you are used to. YMMV -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#242853) next »