On Wednesday 24 May 2006 06:42, James Carman wrote:
Can you give an example of the things it shouldn't?
Here's one:
script type=text/javascript
var unappliedAmount = 0;
updateTotal((+document.getElementById(startingUnapplied).innerHTML));
// alert(startingUnapplied = +unappliedAmount);
function updateTotal(val) {
alert(updateTotal: + val);
unappliedAmount = (+val);
var o = document.getElementById('toApplyAmount');
o.innerHTML = val;
if (unappliedAmount 0) {
o.style.color = '#CC';
} else {
o.style.color = '#00';
}
}
function setAmount(o, val) {
var iobj = o.parentNode.nextSibling.nextSibling.firstChild;
iobj.value = Math.min(val, unappliedAmount);
var echange = document.createEvent(HTMLEvents);
echange.initEvent('change', true, false);
iobj.dispatchEvent(echange);
}
/script
If the '' in 'if (unappliedAmount 0) {' is removed/replaced, no problem,
but as is, tapestry throws a parsing error because it apparently thinks that
the '' is the start of a tag...
My solution, btw, was to move the script to an external .js file.
-J
-Original Message-
From: Mário Lopes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 24, 2006 6:35 AM
To: Tapestry users
Subject: Avoid template parsing
Is there any tag to avoid a certain block of code from being parsed on a
.html?
I have some javascript on that file and it complains about things it
shouldn't.
Regards.
-- Mário
--
Any given program costs more and takes longer.
-- Murphy's Laws of Computer Programming n°8
--
Jason Dyer
BlueTarp Financial, inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]