--- Tony Smith <[EMAIL PROTECTED]> wrote:
> in my jsp, there is something like:
>
> <html:text property="plateDetail.name"
> value="${plateDetailEditForm.plateDetail.name}" />
>
>
> How can I get this element in javascript? the
> following code does not work:
>
> var name =
> document.getElementByName("plateDetail.name").value;
>
> I think it is because there is a '.' in the name.
>
> Any idea?
Get Element By Name goes for the HTML name, like "h1",
"body", etc. For CSS and JavaScript access, you can
use element ID, like this:
<html:text property="plateDetail.name"
value="${plateDetailEditForm.plateDetail.name}"
styleId="plateDetailName" />
<script type="text/javascript">
<!--
name = getElementById( "plateDetailName" );
alert( name.value );
//-->
</script>
Nix.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]