|
Problems with Firefox and Safari. Also, what's up with the $('syntax') ? -- Albert Weinert --
Jeremy schrieb: function GetSpaceSuit_Callback(response) { output.innerText=response.value; Output is not defined as a variable in your js. You have define an element with the id output, so you must use var output = document.getElementById('output'); output.attributeName = fooBar; Ajax.NET Pro and other JavaScript libs (like prototype.js) give you a shortcut function to this. var output = $('output'); output.attributeName = fooBar; or $('output').attributName = fooBar; Strangely enough, no errors show up in Firefox's Javascript console. However, pressing any of my AJAX buttons causes a full page refresh. innerText is not supported by Firefox. But you can assign an element every attribute you want, to store additional information. But the element itself don't know about it. One way is to to this in FireFox is. function setText(elementId, text) { var ele = $(elementId); if (ele.firstChild != null) { ele.parentNode.replaceChild(document.createTextNode(text), ele); } else { ele.appendChild(document.createTextNode(text)); } ele = null; } Also, one other question - in the Starter Kit, I see page elements referred to using a dollar sign, quotes, and parens, like so : $("element").innerHtml = foo; When I try to use this in my own project, it throws errors. Is this errors? Which Errors. $('element').innerHTML = foo; JavaScript is case sensitiv. Maybee you should start freshup your JavaScript and DOM knowledge. -- Freundliche Grüße Albert Weinert http://der-albert.com |