0
javascript functions don't work
New Here
,
/t5/dreamweaver-discussions/javascript-functions-don-t-work/td-p/610936
Apr 03, 2007
Apr 03, 2007
Copy link to clipboard
Copied
Hi,
I have just tried the following code putting the script header to execute it on the client side:
<script>
if(ParentValue == String("Y"))
{
EnableSubGroup();
}
else
{
DisableSubGroup();
}
</script>
I do not get the object expected error anymore
but the functions don't work, why is this?
----Function definition ------
<script type="text/javascript">
function EnableSubGroup()
{
document.forms["SubForm"].elements["SubGroupDD"].disabled='false';
}
function DisableSubGroup()
{
document.forms["SubForm"].elements["SubGroupDD"].disabled='true';
}
</script>
Thanks
Fifi
I have just tried the following code putting the script header to execute it on the client side:
<script>
if(ParentValue == String("Y"))
{
EnableSubGroup();
}
else
{
DisableSubGroup();
}
</script>
I do not get the object expected error anymore
but the functions don't work, why is this?
----Function definition ------
<script type="text/javascript">
function EnableSubGroup()
{
document.forms["SubForm"].elements["SubGroupDD"].disabled='false';
}
function DisableSubGroup()
{
document.forms["SubForm"].elements["SubGroupDD"].disabled='true';
}
</script>
Thanks
Fifi
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/javascript-functions-don-t-work/m-p/610937#M171105
Apr 03, 2007
Apr 03, 2007
Copy link to clipboard
Copied
fifo85 wrote:
> Hi,
>
> I have just tried the following code putting the script header to execute it
> on the client side:
> <script>
> if(ParentValue == String("Y"))
> {
> EnableSubGroup();
> }
> else
> {
> DisableSubGroup();
> }
> </script>
onload=function(){
document.forms["SubForm"].elements["SubGroupDD"].disabled =
!(ParentValue == "Y")
}
This will disable SubGroup if "ParentValue" is not "Y"
Mick
>
> I do not get the object expected error anymore
> but the functions don't work, why is this?
>
> ----Function definition ------
> <script type="text/javascript">
> function EnableSubGroup()
> {
> document.forms["SubForm"].elements["SubGroupDD"].disabled='false';
> }
> function DisableSubGroup()
> {
> document.forms["SubForm"].elements["SubGroupDD"].disabled='true';
> }
> </script>
>
> Thanks
>
> Fifi
>
> Hi,
>
> I have just tried the following code putting the script header to execute it
> on the client side:
> <script>
> if(ParentValue == String("Y"))
> {
> EnableSubGroup();
> }
> else
> {
> DisableSubGroup();
> }
> </script>
onload=function(){
document.forms["SubForm"].elements["SubGroupDD"].disabled =
!(ParentValue == "Y")
}
This will disable SubGroup if "ParentValue" is not "Y"
Mick
>
> I do not get the object expected error anymore
> but the functions don't work, why is this?
>
> ----Function definition ------
> <script type="text/javascript">
> function EnableSubGroup()
> {
> document.forms["SubForm"].elements["SubGroupDD"].disabled='false';
> }
> function DisableSubGroup()
> {
> document.forms["SubForm"].elements["SubGroupDD"].disabled='true';
> }
> </script>
>
> Thanks
>
> Fifi
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Contributor
,
/t5/dreamweaver-discussions/javascript-functions-don-t-work/m-p/610938#M171106
Apr 03, 2007
Apr 03, 2007
Copy link to clipboard
Copied
you might want to try putting language="javascript" in the
script tag.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/javascript-functions-don-t-work/m-p/610939#M171107
Apr 03, 2007
Apr 03, 2007
Copy link to clipboard
Copied
envision3d wrote:
> you might want to try putting language="javascript" in the script tag.
That's deprecated:
http://www.w3.org/TR/html4/interact/scripts.html
W3C says "type" attribute is needed, but it really isn't.
Mick
> you might want to try putting language="javascript" in the script tag.
That's deprecated:
http://www.w3.org/TR/html4/interact/scripts.html
W3C says "type" attribute is needed, but it really isn't.
Mick
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

