File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

document.write

 
Sophia Choi
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried to use document.write to display the value of hidden fields.
input type="text" name="mark_<%=i%>" readonly="readonly" disabled="disabled"
size="3" maxlength="3" value=<%=mark%>
input type="hidden" name = "idx" value="mark_<%=i%>"
<script language="JavaScript"

var frm = document.forms[0];
var markname = frm.idx.value;
document.write(frm.idx.value);
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what is your problem?
 
Sophia Choi
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, my previous post meets a posting problem and it is not complete.
Anyway,I have tried to use document.write to display the value of hidden fields.
String mk = "mark_"+i;
hidden field name is mk and value comes from calculation in javascript
so, I want to display the text value from document.write as NS4.79 doesn't detect the attribute like readonly and disabled
JavaScript:
var frm = document.forms[0];
document.write(frm.mk.value); or
document.write(frm.idx.value) as I use a hidden field named idx to collect the value as "mark_"+i;
The result is null and undefined.
Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic