CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 where to place jQuery Script?

Print topic Send  topic

Author Message
bas
Posted: 04/21/2011, 1:56 AM

I'm trying to use jQuery Zoom script...

After reading a few posts I placed the jQuery stuff right at the top... just
after Title

The JQuery script does not fire

If I put it just after the CCS scripts - the Ajax Autofill does not fire!!

If I rem out the CCS script the JQuery script works but obviously the CCS
bit does not !!

Any ideas would be appreciated.

CodeChargeMVP

Posts: 473
Posted: 04/28/2011, 12:45 PM

Hi,

I think you shall add whatever client event from an object on the current screen, this way CCS will generate the headers for the javascript, then you can place your JQuery code just before thebeginning of the html code.

Finally you delete the event generated but standing the Javascript headers.

Would be also interesting if you check than the JQuery library is correctly called.

I hope it helps.

Quote bas:
I'm trying to use jQuery Zoom script...

After reading a few posts I placed the jQuery stuff right at the top... just
after Title

The JQuery script does not fire

If I put it just after the CCS scripts - the Ajax Autofill does not fire!!

If I rem out the CCS script the JQuery script works but obviously the CCS
bit does not !!

Any ideas would be appreciated.



_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
jjrjr2


Posts: 131
Posted: 04/29/2011, 12:59 AM

Hi

I have experienced several issues getting Jquery to work properly.

If Jquery is loaded at the wrong place & U are using CCS menu functions (or Artisteer Menu Functions) or any other CCS special javascript, one or the other will fail. J query seems to need to be loaded after all the CCS Stuff.

I have found the best place to put the Jquery include line is after the <Body> tag.

I seems all the CCS Javascript needs to load first to avoid conflict.

Hope that helps..

John

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us
View profile  Send private message
solesz

Posts: 137
Posted: 04/29/2011, 2:54 AM

Hi,

Solution:

Prototype (which used by CCS) and JQuery are using the same syntax. to reach specific functions.
This original syntax for both: $(function).
To change JQuery syntax use noConfilct option described here: http://api.jquery.com/jQuery.noConflict/

Then Prototype and JQuery can work besides each other like this:

Then syntax for JQuery will be: jQuery("div p").hide();
Syntax for Prototye remains: $("div p").hide();

That's it. Then where to place the script will be a secondary question.

solesz
View profile  Send private message
bas
Posted: 04/29/2011, 3:44 AM

Hi

Thanks - I've used this right after the Title

<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jqzoom.pack.1.0.1.js"></script>
<link rel="stylesheet" type="text/css" href="css/jqzoom.css">
<style type?css text?>
div.notes{
font-size:12px;
}
div.notes a{
color:#990000;
}
</style>
<script type="text/javascript">
jQuery.noConflict();

jQuery(document).ready(function($) {
$(".jqzoom").jqzoom();
});
</script>

-------------------

This works on my page - my only problem is setting the 'href' from a
database field
img scr="{image_url} is fine but need to set the href too




"solesz" <solesz@forum.codecharge> wrote in message
news:54dba8ad6c9837@news.codecharge.com...
> Hi,
>
> Solution:
>
> Prototype (which used by CCS) and JQuery are using the same syntax. to
> reach
> specific functions.
> This original syntax for both: $(function).
> To change JQuery syntax use noConfilct option described here:
> http://api.jquery.com/jQuery.noConflict/
>
> Then Prototype and JQuery can work besides each other like this:
>
> Then syntax for JQuery will be: jQuery("div p").hide();
> Syntax for Prototye remains: $("div p").hide();
>
> That's it. Then where to place the script will be a secondary question.
>
> solesz
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
>

CodeChargeMVP

Posts: 473
Posted: 04/29/2011, 4:16 AM

Nice, somewhat like protoquerytype.

Quote solesz:
Hi,

Solution:

Prototype (which used by CCS) and JQuery are using the same syntax. to reach specific functions.
This original syntax for both: $(function).
To change JQuery syntax use noConfilct option described here: http://api.jquery.com/jQuery.noConflict/

Then Prototype and JQuery can work besides each other like this:

Then syntax for JQuery will be: jQuery("div p").hide();
Syntax for Prototye remains: $("div p").hide();

That's it. Then where to place the script will be a secondary question.

solesz

_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.