PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Coding & Tutorials (http://www.phpdig.net/forum/forumdisplay.php?f=31)
-   -   How to use variable in src tag (http://www.phpdig.net/forum/showthread.php?t=2479)

ravi 06-15-2006 06:18 AM

How to use variable in src tag
 
I have a function in plugins folder in Smarty. The function file is function.getdirname.php. This function parses value in the variable as follows:

{getdirname dir = APP_IMAGE_PATH} where value of the APP_IMAGE_PATH that the function parses is "../images/"

code in html is as follows:
<script type='text/javascript' src='../images/myscript.php'></script>

I want to replace "../images" part in the above code using smarty function getdirname.

How can I do it ?

Thanks,
Ravi

ravi 06-15-2006 06:58 AM

Got it to work
 
Got it to work.

<script type='text/javascript' src ={getdirname dir = APP_COMMON_PATH}{$dir}myscript.php></script>

Thanks.


All times are GMT -8. The time now is 06:01 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.