From 0b0d95eb8df416feb8a54fd517957d08b0cf20d2 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 17 Jan 2007 12:48:20 +0000 Subject: add dynamic callback repeater test. --- framework/Web/Javascripts/js/compressed/prado.js | 6 +++--- framework/Web/Javascripts/js/debug/prado.js | 3 +++ framework/Web/Javascripts/prado/element.js | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'framework/Web/Javascripts') diff --git a/framework/Web/Javascripts/js/compressed/prado.js b/framework/Web/Javascripts/js/compressed/prado.js index a1da1efb..e1c566e0 100644 --- a/framework/Web/Javascripts/js/compressed/prado.js +++ b/framework/Web/Javascripts/js/compressed/prado.js @@ -259,11 +259,11 @@ $('PRADO_POSTBACK_TARGET').value=options['EventTarget'];$('PRADO_POSTBACK_PARAME Prado.Element={setValue:function(element,value) {var el=$(element);if(el&&typeof(el.value)!="undefined") el.value=value;},select:function(element,method,value,total) -{var el=$(element);var selection=Prado.Element.Selection;if(typeof(selection[method])=="function") +{var el=$(element);if(!el)return;var selection=Prado.Element.Selection;if(typeof(selection[method])=="function") {control=selection.isSelectable(el)?[el]:selection.getListElements(element,total);selection[method](control,value);}},click:function(element) {var el=$(element);if(el) Event.fireEvent(el,'click');},setAttribute:function(element,attribute,value) -{var el=$(element);if((attribute=="disabled"||attribute=="multiple")&&value==false) +{var el=$(element);if(!el)return;if((attribute=="disabled"||attribute=="multiple")&&value==false) el.removeAttribute(attribute);else if(attribute.match(/^on/i)) {try {eval("(func = function(event){"+value+"})");el[attribute]=func;} @@ -271,7 +271,7 @@ catch(e) {throw"Error in evaluating '"+value+"' for attribute "+attribute+" for element "+element.id;}} else el.setAttribute(attribute,value);},setOptions:function(element,options) -{var el=$(element);if(el&&el.tagName.toLowerCase()=="select") +{var el=$(element);if(!el)return;if(el&&el.tagName.toLowerCase()=="select") {el.options.length=options.length;for(var i=0;i