homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
How to pass php variable to jquery javascript
chrissim




msg:4431214
 10:20 am on Mar 20, 2012 (gmt 0)

i have this config.php update and write new variable $uploaddir everytime i create new folder and i need to pass those variable 'new upload folder' to jquery javascript href below.
Please help as i been pulling my hair for several days now...



<?php

$uploaddir = '../folder/newfolder/';

?>




.bind('uploadSuccess', function(event, file, serverData){
var item=$('#log li#'+file.id);
item.find('div.progress').css('width', '100%');
item.find('span.progressvalue').text('100%');
var pathtofile='<a href="../$uploaddir/'+file.name+'" target="_blank" >view upload file &raquo;</a>';
item.addClass('success').find('p.status').html('Done! | '+pathtofile);
})


 

chrissim




msg:4431221
 10:46 am on Mar 20, 2012 (gmt 0)

nevermind guys i solved it

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved