Javascript in HTML Block

Ok I am trying to add FatFreeCart to a c5 site. When I insert the code the edit bar disappears. I can see that this is a javascript issue but don't know how to deal with it.

The script works perfectly in the c5 page but the page is no longer editable. If I want to change it I have to restore a previous version and put everything back in.

It appears that c5 will have to be changed to make this work but wanted to post here and see if anyone else has resolved this problem.

Here is the JS code that is being called buy FatFreeCart:

<!-- AddToCart Snippet
  @version: 0.1
  @date: 07/30/2007
  @author: Ropu (rovagnati at gmail)
  <table cellspacing="2" cellpadding="2" bgcolor="#ffffff" style="border: thin solid rgb(100,100,100);font-family: Verdana; font-size: 11px; color: rgb(0, 0, 0);">    
    <tr align="center">
      <th bgcolor="#dddddd" style="color: rgb(0, 0, 0);">Class Registration Fee</th>
      <td align="center">
      <!-- ADD TO CART button code. -->
        <form target="ej_ejc" action="" method="post">
        <div style="background:#eeeeee">

View Replies:
Tony replied on at Permalink Reply
there's a problem with the HTML block, that may or may not be related to your issue (htmlentities fix is posted down below):

btw, do you have firebug loaded up and are you seeing any javascript errors?
carlanw replied on at Permalink Reply
Sorry didn't think to check firebug. Yes there is an error:

Code tags hate me the source file is just the url+/concrete/js/ccm.dialog.js

Error: jQuery.fn.dialog is undefined
Source File:
Line: 374

Don't know if that means anything to you or not but its beyond me.

Thank you for your help.

carlanw replied on at Permalink Reply
When I am not in edit mode there is no JS error in Firebug... aka go and manually approve the page and then view it the FatFreeCart works fine and there is no error...

Still doens't solve the page edit problem though! :)
platypusman replied on at Permalink Reply
Don't know if you ever got this figured out, but I and some others ran into the same problem (Edit bar disappearing) when linking to other js libraries. ( ) It seems to make a difference in what order the scripts are loaded -- in my case I had to put the extra js links *before* the Loader::element('header_required'); element and then the Edit bar returned and worked normally again.

You could try linking to the js files in the head of the template, rather than inside your php block at the end.
fr0z3nk0 replied on at Permalink Reply
I was experiencing the same issue when suddenly I couldn't edit most of the pages.

I figured that it was down to loading jquery twice.

First time its loaded it in header_required and second time in page_controls_header.

Maybe it was me editing those files and I might have added one of those includes. If not then it is probably something you guys should look at and fix it.

i'm using concrete

mkharisecario replied on at Permalink Reply
I've found some case when we must put reference js before header_required loader as platypusman said...

so far I can use 2 solution :
-delete conflicted js, and
-put reference js before header_required

dunno if there is any other simple solution?
SVijay replied on at Permalink Reply

Yes as mkharisecario said remove JQuery supporting file or it may conflict. Jquery supporting file is inbuilt in concrete5.
mkharisecario replied on at Permalink Reply
Did you have this code in your html code?

<script type="text/javascript" src=""></script>

if yes, I think you must delete that script. I've had same problem before because of that line. But it fixed after I deleted it.

*refering to: