Click here to Skip to main content
15,900,906 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: reattaching an html element. Pin
swjam21-Sep-10 4:14
swjam21-Sep-10 4:14 
GeneralRe: reattaching an html element. Pin
Not Active21-Sep-10 4:57
mentorNot Active21-Sep-10 4:57 
QuestionIndicating a button has been pushed Pin
bklerner14-Sep-10 8:29
bklerner14-Sep-10 8:29 
AnswerRe: Indicating a button has been pushed Pin
Skippums22-Sep-10 4:15
Skippums22-Sep-10 4:15 
Questiondynamic event - pass value Pin
Hanzaplast14-Sep-10 2:29
Hanzaplast14-Sep-10 2:29 
AnswerRe: dynamic event - pass value [modified] Pin
daveyerwin14-Sep-10 5:47
daveyerwin14-Sep-10 5:47 
GeneralRe: dynamic event - pass value Pin
Hanzaplast14-Sep-10 23:34
Hanzaplast14-Sep-10 23:34 
QuestionjQuery/jTemplate question [Solved] Pin
RCoate9-Sep-10 18:52
RCoate9-Sep-10 18:52 
I want to use jQuery and jTemplates to display information returned via a webservice.

The code I am trying is:
function InsertAfter(RowID, json) {
     var thisTable = document.getElementById("myTable");
    var newRow = thisTable.insertRow(GetRowIndex(RowID));

    newCell = newRow.insertCell(0);
    newCell.colspan = '3';
    newID =  RowID + 'Results';
    newCell.id = newID;
    var template = $('#jTemplateResultsRow').html();
    var item = $('#' + newID);

    item.setTemplate(template);
    item.processTemplate(json);

}


Everything goes fine til I get to the item.setTemplate(template);. Then I get a Microsoft JScript runtime error: Object doesn't support this property or method error.

I have double checked that both the jQuery and jTemplates libraries are loaded and that there are no conflicting javascript templates/frameworks/etc that are referenced.

Both the template and item get set to valid values.

Does anyone have any ideas or suggestions that could help?

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

The issue was with the web service returning a nested json string.

All now works Smile | :)

modified on Wednesday, September 22, 2010 12:33 AM

AnswerRe: jQuery/jTemplate question Pin
Pete O'Hanlon15-Sep-10 0:47
mvePete O'Hanlon15-Sep-10 0:47 
GeneralRe: jQuery/jTemplate question Pin
RCoate21-Sep-10 18:33
RCoate21-Sep-10 18:33 
GeneralRe: jQuery/jTemplate question Pin
Pete O'Hanlon22-Sep-10 2:27
mvePete O'Hanlon22-Sep-10 2:27 
AnswerRe: jQuery/jTemplate question [Solved] Pin
Sunasara Imdadhusen4-Oct-10 1:49
professionalSunasara Imdadhusen4-Oct-10 1:49 
Questionprotecting javascript IP Pin
swjam3-Sep-10 17:24
swjam3-Sep-10 17:24 
AnswerRe: protecting javascript IP Pin
DaveAuld4-Sep-10 4:16
professionalDaveAuld4-Sep-10 4:16 
GeneralRe: protecting javascript IP Pin
NeverHeardOfMe4-Sep-10 5:47
NeverHeardOfMe4-Sep-10 5:47 
GeneralRe: protecting javascript IP Pin
DaveAuld4-Sep-10 5:49
professionalDaveAuld4-Sep-10 5:49 
QuestionclearInterval Not working on IE Pin
greendragons3-Sep-10 3:46
greendragons3-Sep-10 3:46 
AnswerRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:11
mentorNot Active3-Sep-10 4:11 
GeneralRe: clearInterval Not working on IE Pin
greendragons3-Sep-10 4:16
greendragons3-Sep-10 4:16 
GeneralRe: clearInterval Not working on IE Pin
phil.o3-Sep-10 4:23
professionalphil.o3-Sep-10 4:23 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 4:27
mentorNot Active3-Sep-10 4:27 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:10
professionalDaveAuld3-Sep-10 5:10 
GeneralRe: clearInterval Not working on IE Pin
DaveAuld3-Sep-10 5:09
professionalDaveAuld3-Sep-10 5:09 
AnswerRe: clearInterval Not working on IE Pin
NeverHeardOfMe3-Sep-10 11:44
NeverHeardOfMe3-Sep-10 11:44 
GeneralRe: clearInterval Not working on IE Pin
Not Active3-Sep-10 17:11
mentorNot Active3-Sep-10 17:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.