PhpDig.net

Go Back   PhpDig.net > General Forums > Coding & Tutorials

Reply
 
Thread Tools
Old 06-15-2006, 06:18 AM   #1
ravi
Green Mole
 
Join Date: Jun 2006
Posts: 3
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 is offline   Reply With Quote
Old 06-15-2006, 06:58 AM   #2
ravi
Green Mole
 
Join Date: Jun 2006
Posts: 3
Got it to work

Got it to work.

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

Thanks.
ravi is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined variable: user_agent noel Bug Tracker 6 10-30-2005 04:32 PM
Exclue url variable djavet How-to Forum 1 03-15-2005 09:04 PM
Adding a variable to the end of every link? cwheat Troubleshooting 7 05-26-2004 10:15 AM
Undefined Variable: $reg blackfeather Bug Tracker 2 05-01-2004 11:02 AM
Not recognising get variable pages BCVisin Troubleshooting 7 04-15-2004 10:42 PM


All times are GMT -8. The time now is 09:32 AM.


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