?
=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
Hello,
I've been trying to figure something out for the past few days and I
can't seem to pinpoint what I'm doing wrong.
I've been trying to call javascript from inside a <logic:equal>, but
it doesn't seem to work like I want.
I've tried calling an alert('hello'); to test out if my call worked
correctly, and it does, but when I call my own javascript functions
that I create in the html/head, they don't seem to get executed. Any
idea why (except disbaleCif() which I call through onload)?
Here's a snippet of code:
<html>
<head>
<link REL="stylesheet" HREF="css/bear.css" TYPE="text/css">
<script type="text/javascript">
function disableCif()
{
document.ManageKQADocumentForm.cifType1.disabled="true";
document.ManageKQADocumentForm.cifType2.disabled="true";
document.ManageKQADocumentForm.cifType3.disabled="true";
}
function enableCifType1()
{
document.ManageKQADocumentForm.cifType1.disabled="false";
}
function enableCifType2()
{
document.ManageKQADocumentForm.cifType2.disabled="false";
}
function enableCifType3()
{
document.ManageKQADocumentForm.cifType3.disabled="false";
}
</script>
</head>
<body class="MainBody" onload="javascript:disableCif();">
<logic:iterate id="cifType" property="checkItemFormTypes"
name="manageKQADocumentTO">
<logic:equal value="1" name="cifType">
<script> alert('hello'); </script>
</logic:equal>
<logic:equal value="2" name="cifType">
<script> enableCifType2(); </script>
</logic:equal>
<logic:equal value="3" name="cifType">
<script> enableCifType3(); </script>
</logic:equal>
</logic:iterate>
Regards
Jean-Francois Michaud
I've been trying to figure something out for the past few days and I
can't seem to pinpoint what I'm doing wrong.
I've been trying to call javascript from inside a <logic:equal>, but
it doesn't seem to work like I want.
I've tried calling an alert('hello'); to test out if my call worked
correctly, and it does, but when I call my own javascript functions
that I create in the html/head, they don't seem to get executed. Any
idea why (except disbaleCif() which I call through onload)?
Here's a snippet of code:
<html>
<head>
<link REL="stylesheet" HREF="css/bear.css" TYPE="text/css">
<script type="text/javascript">
function disableCif()
{
document.ManageKQADocumentForm.cifType1.disabled="true";
document.ManageKQADocumentForm.cifType2.disabled="true";
document.ManageKQADocumentForm.cifType3.disabled="true";
}
function enableCifType1()
{
document.ManageKQADocumentForm.cifType1.disabled="false";
}
function enableCifType2()
{
document.ManageKQADocumentForm.cifType2.disabled="false";
}
function enableCifType3()
{
document.ManageKQADocumentForm.cifType3.disabled="false";
}
</script>
</head>
<body class="MainBody" onload="javascript:disableCif();">
<logic:iterate id="cifType" property="checkItemFormTypes"
name="manageKQADocumentTO">
<logic:equal value="1" name="cifType">
<script> alert('hello'); </script>
</logic:equal>
<logic:equal value="2" name="cifType">
<script> enableCifType2(); </script>
</logic:equal>
<logic:equal value="3" name="cifType">
<script> enableCifType3(); </script>
</logic:equal>
</logic:iterate>
Regards
Jean-Francois Michaud