Ok, i figure out what i was doing wrong. The trick is the starting tag. You have:

// <!-- //

which works fine. I was just using

<!--

Like http://www.javascripter.net/faq/hidingjs.htm and other sites give as an example.

Thanks...

Josh Canfield wrote:
Define didn't work. Didn't work on a particular browser?

I have this code in production and it seems to work fine in
Firefox/IE/Safari.

  <script>
 //noinspection JSUnresolvedFunction
    Event.observe(window, 'load',
  function() {
   var orderField = '${sortOrderField}';
   var rowsId = 'vpl_rows${id}';
   var rowIdPrefix = 'vpl_row_${id}_';
   var sourceLister = '${sourceLister}';
  // <!-- //
   var props = {
    dropOnEmpty: true,
    containment: [rowsId],
    tag: "div",
    'only': [ 'vpl_row' ],
    onUpdate: function() {
     var orderList = '';
     var rows = document.getElementById(rowsId);
     var orderedNodes = rows.getElementsByClassName('vpl_row');
     for (var i=0;i *<* orderedNodes.length;i++) {
      var id = orderedNodes[i].id;
      id = id.substring(id.lastIndexOf('_')+1);
      orderList += id + ',';
        }
     document.getElementById(orderField).value = orderList;
    }
   };
   if ( sourceLister ) {
    props.containment[1] = 'vpl_rows' + sourceLister;
    props.constraint = false;
   }

   //noinspection JSUnresolvedFunction
            Sortable.create(rowsId, props);
  }
 );
 // -->
 </script>

Josh

On 10/12/07, Hugo Palma <[EMAIL PROTECTED]> wrote:
I tried that and it didn't work.

Josh Canfield wrote:
You can use inline javascript in your templates, you just need to use
the
old trick that used to be used to hide js from the browser
 http://www.javascripter.net/faq/hidingjs.htm

<script> <!--
// tapestry will move this up in the output

// -->
</script>

Josh

On 5/8/07, Alexandru Dragomir <[EMAIL PROTECTED]> wrote:

As you mentioned , the workaround is to put the javascript (or at least
the
one  that contains the  < and >) in a separate file.
This should be fine for majority of cases.
Alex

On 5/8/07, Mike_R <[EMAIL PROTECTED]> wrote:

Hi,

I was copying some google maps javascript
(http://www.google.com/uds/samples/places.html)  inside of the head of

my

Border component.
Since the javascript code uses < and >, it's protected with
//<![CDATA[
When I try to use the Border component with this CDATA block I get a
message
stating 'not implemented yet: CDATA'.

Is this a known limitation, should I file a bug and how can I solve

this?

When I put the javascript in a separate file the error seemed gone,
haven't
tested any further though.

thanks for the help
Mike


--
View this message in context:


http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








Reply via email to