bvtoffin
06-29-2004, 10:49 PM
I am having problems with getting a value into a variable from a hidden <div> field - all I get is 'undefined'.
The content for the <div> field comes from a tag which is automatically changed in the page as it loads.
Simplified version of the page is as follows;
<head>
<script language="javascript">
var info1=document.all.refnc.innerhtml;
var info=(info1.substring(58,64));
</script>
</head>
<body>
<script>document.write(itin_info);</script>
<div id="refnc" style="display:none">
<!-- OD_INSERT Reference -->
</div>
</body>
As the page is built the " <!-- OD_INSERT Reference --> " gets translated to the following;
<div id="refnc" style="display:none">
<font size="3">Reference</font>
<font size="4"> GH/123456</font>
</div>
Note: the line break at the end of both lines.
Any help with this would appreciated.
Cheers
BVT.
The content for the <div> field comes from a tag which is automatically changed in the page as it loads.
Simplified version of the page is as follows;
<head>
<script language="javascript">
var info1=document.all.refnc.innerhtml;
var info=(info1.substring(58,64));
</script>
</head>
<body>
<script>document.write(itin_info);</script>
<div id="refnc" style="display:none">
<!-- OD_INSERT Reference -->
</div>
</body>
As the page is built the " <!-- OD_INSERT Reference --> " gets translated to the following;
<div id="refnc" style="display:none">
<font size="3">Reference</font>
<font size="4"> GH/123456</font>
</div>
Note: the line break at the end of both lines.
Any help with this would appreciated.
Cheers
BVT.