cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "magic" <ma...@soho.club.tw>
Subject Re: how to get nodevalue in javascript
Date Fri, 20 Aug 2004 06:33:16 GMT
Sorry, I miss "getFirstChild()". When I wrote "var a1 =
document.getFirstChild().getChildNodes().item(1).getFirstChild().getNodeValu
e();", it works.
----- Original Message ----- 
From: "magic" <magic@soho.club.tw>
To: <users@cocoon.apache.org>
Sent: Friday, August 20, 2004 2:15 PM
Subject: how to get nodevalue in javascript


> hi, everyone
>
>         When I wrote "var a1 =
> document.getFirstChild().getChildNodes().item(1).getNodeValue();", a1 =
> null.  How can I get nodevalue in javascript? Someone help me? Thanks!
>
> function obm1(form) {
>      var documentURI = cocoon.parameters["documentURI"];
>      var document = loadDocument(documentURI);
>
>      // bind the document data to the form
>      form.load(document);
>
>  var wid=form.lookupWidget();
>  wid.obm1_date.value=new java.util.Date();
>  wid.obm2List[0].obm2_part.value =
> document.getFirstChild().getChildNodes().item(1).getNodeName();
>  wid.obm2List[1].obm2_part.value =
> document.getFirstChild().getChildNodes().item(1).getNodeValue();
>
>  form.showForm("obm1-display-pipeline");
>  }
>
> Magic
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message