You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kiuma <ki...@usa.net> on 2002/10/10 17:43:01 UTC

javascript help

The previous problem was on <script> tag.


<head>

    <html-el:base/>
    <title><bean-el:message key="title.userfinder"/></title>
    <link rel="stylesheet"  href="../css/common.css" TYPE="text/css"/>
    <link rel="stylesheet"  href="../css/anagr.css" TYPE="text/css"/>

    <SCRIPT language='JavaScript' src='../scripts/formscripts.txt'>

</head>

this is formscrpts.txt


function selectAllChk( fromName, chkBoxName )
{
    var chkboxes = document.getElementsByTagName( 'input' );
    for (i=0; i < chkboxes.length; i++) {
        if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) &
            ( chkboxes.item(i).getAttribute('name') == chkBoxName ) )
        {
            chkboxes.item(i).checked =! 
chkboxes.item(i).checked;                       
        }
    }
}


What's wrong with it? Why inserting tag <SCRIPT language='JavaScript' 
src='../scripts/formscripts.txt'> doesn't make my app start?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javascript help

Posted by kiuma <ki...@usa.net>.
nope sigh!!

The problem is that the script works under mozilla!!

Please help!!



James Mitchell wrote:

>Are you trying to call selectAllChk when the page loads?
>
>James Mitchell
>Software Engineer/Struts Evangelist
>http://www.open-tools.org
>
>>-----Original Message-----
>>From: kiuma [mailto:kiuma@usa.net]
>>Sent: Thursday, October 10, 2002 11:43 AM
>>To: Struts Users Mailing List
>>Subject: javascript help
>>
>>
>>The previous problem was on <script> tag.
>>
>>
>><head>
>>
>>    <html-el:base/>
>>    <title><bean-el:message key="title.userfinder"/></title>
>>    <link rel="stylesheet"  href="../css/common.css" TYPE="text/css"/>
>>    <link rel="stylesheet"  href="../css/anagr.css" TYPE="text/css"/>
>>
>>    <SCRIPT language='JavaScript' src='../scripts/formscripts.txt'>
>>
>></head>
>>
>>this is formscrpts.txt
>>
>>
>>function selectAllChk( fromName, chkBoxName )
>>{
>>    var chkboxes = document.getElementsByTagName( 'input' );
>>    for (i=0; i < chkboxes.length; i++) {
>>        if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) &
>>            ( chkboxes.item(i).getAttribute('name') == chkBoxName ) )
>>        {
>>            chkboxes.item(i).checked =!
>>chkboxes.item(i).checked;
>>        }
>>    }
>>}
>>
>>
>>What's wrong with it? Why inserting tag <SCRIPT language='JavaScript'
>>src='../scripts/formscripts.txt'> doesn't make my app start?
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>.
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: javascript help

Posted by James Mitchell <jm...@telocity.com>.
Are you trying to call selectAllChk when the page loads?

James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

> -----Original Message-----
> From: kiuma [mailto:kiuma@usa.net]
> Sent: Thursday, October 10, 2002 11:43 AM
> To: Struts Users Mailing List
> Subject: javascript help
>
>
> The previous problem was on <script> tag.
>
>
> <head>
>
>     <html-el:base/>
>     <title><bean-el:message key="title.userfinder"/></title>
>     <link rel="stylesheet"  href="../css/common.css" TYPE="text/css"/>
>     <link rel="stylesheet"  href="../css/anagr.css" TYPE="text/css"/>
>
>     <SCRIPT language='JavaScript' src='../scripts/formscripts.txt'>
>
> </head>
>
> this is formscrpts.txt
>
>
> function selectAllChk( fromName, chkBoxName )
> {
>     var chkboxes = document.getElementsByTagName( 'input' );
>     for (i=0; i < chkboxes.length; i++) {
>         if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) &
>             ( chkboxes.item(i).getAttribute('name') == chkBoxName ) )
>         {
>             chkboxes.item(i).checked =!
> chkboxes.item(i).checked;
>         }
>     }
> }
>
>
> What's wrong with it? Why inserting tag <SCRIPT language='JavaScript'
> src='../scripts/formscripts.txt'> doesn't make my app start?
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>