input type=hidden control - value is blank using javascript

R

Rotsey

Hi,

I have a application that fills a html hidden control with xml serverside.

I use javascript to read the value of the control on the client.

The problem is the value property is blank when using Firefox, ok in IE6.

When I view the page source with Firefox I see the control and xml.

But the value is blank in javascript.

Any ideas?
rotsey
 
L

Laurent Bugnion

Hi,
Hi,

I have a application that fills a html hidden control with xml serverside.

I use javascript to read the value of the control on the client.

The problem is the value property is blank when using Firefox, ok in IE6.

When I view the page source with Firefox I see the control and xml.

But the value is blank in javascript.

Any ideas?
rotsey

What XML do you set in the control?

The simple test hereunder works fine in IE and Firefox.

<form>
<input type="hidden" id="tfXml" value="<abcd>hello</abcd>" />
<br />
<input type="button"
onclick="alert(document.getElementById('tfXml').value);" />
</form>

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top