This topic is locked
[SOLVED]

 jQuery and PHPrunner does not work

6/21/2011 10:01:49 AM
PHPRunner General questions
B
bluedude author

Hi,
I'm trying to use jQuery in PHPRunner but it does not work. This is what I use in the script tag:
<script type="text/javascript" src="js/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="js/lightbox/themes/default/jquery.lightbox.css" />

<!--[if IE 6]><link rel="stylesheet" type="text/css" href="js/lightbox/themes/default/jquery.lightbox.ie6.css" /><![endif]-->

<script type="text/javascript" src="js/lightbox/jquery.lightbox.js"></script>

<script type="text/javascript">

jQuery(document).ready(function(){

jQuery('.lightbox').lightbox();

});

</script>
However, when I have added this an open a listview it will keep showing an overlay with "Loading...".
Does PHPRunner load jquery already?
I have this problem already for almost a year and I cannot get any project to run with jquery plugins.
Cheers,

Admin 6/21/2011

PHPRunner includes jQuery already. PHPRunner 5.3 comes with jQuery 1.3.2, in PHPRunner 6 we'll upgrade to the latest stable jQuery version 1.6.1.

B
bluedude author 6/21/2011

Right.
I want to add a lightbox (plugin) to a hyperlink in a list. The lightbox can be triggered with a class called lightbox. Where in the code should I add this?
The hyperlink needs to open in the lightbox.
Any suggestions?
Cheers,

Admin 6/21/2011

The best approach is to use 'View as' type 'Custom' where you can add required attributes to the hyperlink. To include additional Javascript files use the method described in this article: http://xlinesoft.com/phprunner/docs/how_to_add_external_files.htm

B
bluedude author 6/21/2011

Mmm, custom View as is PHP and my stuff is just a class to be added to the hyperlink. BTW, PHPRunner has a lower jQuery version it seems. My plugin complains it is not 1.3+.
In which file is the jquery loaded? I either want to replace jquery.js or call another newer version.

B
bluedude author 6/21/2011

Using a newer jQuery version breaks stuff in PHPRunner 5.3. It would be some much better if you guys would provide a great lightbox for HTML content etc. built in.
I have requested this many times and I think this is an important feature. Nowadays you see great overlays everywhere. The lighbox implementation you have for images is not the best and on top of that it would be nice to be able to set it on hyperlinks.
Here is a great lightbox: http://codecanyon.net/item/jquery-lightbox-evolution/115655 It works perfectly on all browser.
Cheers,

Admin 6/21/2011

Correction, the current version we use is 1.2.6. You can find jQuery.js file in C:\Program Files\PHPRunner5.3\source\include\common directory.

B
bluedude author 6/21/2011

Tried to copy in a new version but the PHPRunner code breaks unfortunately. See my remarks in a previous thread, would be good to adapt some perfectly working Lightbox.
So I have no solution for now because it seems something is wrong when adding a new jquery version.
Cheers,

Admin 6/21/2011

I guess you need to wait till PHPRunner 6 is released.