How to call Flexbox by relative path store in variables

May 9, 2012 at 9:29 AM
Edited May 9, 2012 at 9:31 AM

Hello Everybody

I have a little problem, when I use the following code

<script type="text/javascript"
 $(function() { 
U="<?php echo $_SESSION['tabAppDRAMConfigurator']["PathWeb"];?>/modules/BRAND/module_dram_device_brand_dropdownlist_ajax.php";
$('#devicebrand').flexbox(U);
 });
</script>
My flexbox empty but when used this code
<script type="text/javascript">  
$(function() {	
$('#devicebrand').flexbox("./modules/BRAND/module_dram_device_brand_dropdownlist_ajax.php");
	
});
</script> 
my flexbox work properly but I need used a variable to do an easy portability of my website
Have you an idea
Best Regards
Pablo PGJ
Coordinator
May 9, 2012 at 4:22 PM

Pablo,

Have you confirmed that the php variable is populated correctly, and that the path passed to the ā€œUā€ variable is what you expect?

There should be no problem with using a variable in general. For example, you can test this to eliminate any problem with variable passing:

<script type="text/javascript"> 
    $(function() { 
        var U="./modules/BRAND/module_dram_device_brand_dropdownlist_ajax.php";
        $('#devicebrand').flexbox(U);
    });
</script>

Thanks,

Noah

From: PabloL [email removed]
Sent: Wednesday, May 09, 2012 2:30 AM
To: Noah Heldman
Subject: How to call Flexbox by relative path store in variables [flexbox:355047]

From: PabloL

Hello Everybody

I have a little problem, when I use the following code

<script type="text/javascript"> 
 $(function() { 
U="<?php echo $_SESSION['tabAppDRAMConfigurator']["PathWeb"];?>/modules/BRAND/module_dram_device_brand_dropdownlist_ajax.php";
$('#devicebrand').flexbox(U);
 });
</script>
My flexbox empty but when used this code
<script type="text/javascript">  
$(function() { 
$('#devicebrand').flexbox("./modules/BRAND/module_dram_device_brand_dropdownlist_ajax.php");
        
});
</script>
 
 
 
my flexbox work properly but I need used a variable to do an easy portability of my website
 
Have you an idea
 
Best Regards
 
Pablo PGJ