jtemplate

How to update a table row with save button using .ajax

I have a table which has one row and only one cell will be editable. I have accomplished this with the following code. $("td#effEndDate").click(function() { if (!$(this).hasClass("edit")) { var value = jQuery.trim($(this).html()); $(this).html("<input id=\"txtEdit\" type=\"text\" value=\"" + ...

Why does the HTML in my JSON response get encoded?

I'm using this blog post as a guide, detailing how to use jQuery with jTemplates to stuff a JSON response into a template. My problem is, one of the returned fields (named Description) contains HTML, but the HTML brackets are getting encoded to \u003C and \u003e. Here's the HTML (in the Description field) the server returns: <a href="...

Jtemplate Accessibility question

Hi all the Accessibility experts, I use jtemplate in my website and have issue to pass w3c Web Accessibility. The issue is that jtemplate (well, not only jtemplate but most of other client template) uses hidden <textarea> as the template holder. And according to W3c Accessibility standard, every textbox/textarea required an associated l...

Basic jTemplate not working

I'm using jTemplate & jQuery to query a .net Web Method, then display the results in a webpage. Shown below is the HTML where it all happens, the DIV with the class Template is my template. Then the actual results get put into the DIV with the class Results. <div id="SharepointDocumentSearch" style="display:none;"> <p> Docu...

JTEMPLATE process template is undefined on pageload

Hi, I have a java script which i am using to pass data to a jtemplate . but on page load the processTemplate gives me an undefined error. But when i refresh the page it is working fine.please solve this for me. Thanks ...

Error with jtemplates with tables

I am using jtemplates with jquery and getting an error when I try to use tables in the template. Following is working <ul> {#foreach $T as record} <li>{$T.record.FirstName}</li> {#/for} </ul> but the following does not work and gives error $T.record is undefined in firebug <table border="1"> {#foreach $T as record} <tr> <td>{$T....

Compositing Multiple Templates in jTemplates

Using jTemplates, it is possible to composite templates like so... <textarea id="templateList" class="template"><!-- {#template RESULTS} This a template for generating a list of results {#include PAGINATION root=$T} {#/template RESULTS} {#template PAGINATION} This is a template for generating pagination through the r...

What is the correct way to save hidden data on a table?

I use the jTemplates plugin to load data on my tables. Because there are some properties I do not display yet I want available for later use, I save them in hidden fields and then grab them by their CSS's class name and jQuery's siblings method. Is this a correct way of doing such operation, or would this be considered terrible code? <...

Named templates in jTemplate?

Is there any way to have multiple templates, and tell jTemplate which one to use? All examples I've seen always start with a template called MAIN. I would like to put this into one template file: {#template MAIN1} ... {#/template MAIN1} {#template MAIN2} ... {#/template MAIN2} Is this possible? ...

jtemplates append instead of overwrite

Hi all, I'm using jtemplates (jquery plugin) as my templating solution which rocks by the way! I replaced my asp.net updatepanels with this and my god what a speed booster. The problem I have however is that I'm loading user comments under an article with this templating system. I'm processing the template like this: function ApplyTem...

Persisting textbox value using jQuery

I'd like to save the newly entered values, so I could reuse them. However, when I try to do the following, it does not work: // el is a textbox on which .change() was triggered $(el).attr("value", $(el).val()); When the line executes, no errors are generated, yet Firebug doesn't show that the value attribute of el has changed. I tr...

jTemplate - >, < are not allowing inside templating

Hi, I am using JTemplate engine in jQuery. I want to integrate paging for a grid. So I am passing page index, size and total as params for paging template. When I add condition by using > or < like {#if $P.index > 1 }, it is giving error as "gt is not defined". It is working fine if I use other operations like "=='. But not working for ...

Problem with JTemplates in chrome

I have a template which consists textarea inside template. In IE, firefox browsers, it is working fine but in chrome it is not working. If i remove textarea inside the template, then its too working in chrome. Can any one help me? ...