Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Im currently working in another project which Im modifying. And I have .jade .php .js files.

In the jade file which is index I import a couple of scripts to use in the view. Like this:

<script src="/lib/jquery-1.5.1.min.js"></script>
<script src="/socket.io/socket.io.js"></script>

The problem is that I need to use a more recent jquery lib to be able to use $.get, $.post or $.ajax BUT the

<script src="/lib/jquery.blockUI.js"></script> 

wont allow me to use like jquery-2.0.3.min.js, any work around here? It is in jade and haven't really worked with it until now.

I just need something that can execute/run a php script with javascript in it. Or is it possible to maybe execute a javascript file from another javascript file?

So it is basically trying to import two libs or merge the libs. And everything will be ok. Or some kind of work around to execute the script.

EDIT:

From my script.js

$.get('getId.php' , function( data ) {console.log(data)});

From my getId.php

<?php echo 'name' ?>

I don't get just 'name' when I try to get it I get the whole script as a string.

share|improve this question
    
what do you mean it wont allow you to use ? –  lagbox 2 days ago
    
I mean if I include the newer jquery lib I can't use jquery.blockUI.js. I guess they removed something that let me use that lib in the newer version ? ;< –  cpt_fleppo 2 days ago
    
then you cant if you want to keep using jquery blockui –  lagbox 2 days ago
    
Yes exactly! That is why im asking if there is some kind of merge or a way to use both libs :) –  cpt_fleppo 2 days ago
1  
you could use two jQuery versions....it's a bit overkill, but if blockUI is locking you to jQuery 1.5 then it may be your only option... stackoverflow.com/a/15383015/1097858 –  OAC Designs 2 days ago
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.