aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes document.write Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "document.write" Watch "document.write" New topic
Author

document.write

Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
And what is your problem?
Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
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
 
subject: document.write