The reference to a hidden field's value should be:
document.myForm.myHidden.value
where myForm is the name of your form and myHidden is the name of your hidden field.
So if you change the line:
var htmlText = form.hdHTML;
to:
var htmlText = form.hdHTML.value;
it might work.
/Adam Killander
Damian O'Connor wrote:
> Hi,
>
> I can't seem to find the answer to this on the forums although I'm sure it's there
>somewhere.
>
> I have a hidden field hdHTML that contains some html code. I also have a javascript
>function
> that I want to use to retrieve it and use it to open a new window.
>
> Any ideas how to get the value in the hidden field!
>
> Cheers,
> Damian
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> imagename = ''
> function enlrge(imgnme, form) {
> lrgewin = window.open("about:blank","","height=200,width=400")
> imagename = imgnme;
> var htmlText = form.hdHTML;
> setTimeout('update(htmlText)',500)
> }
>
> function update(htmlText) {
> doc = lrgewin.document;
> doc.open('text/html');
> doc.write(htmlText)
> doc.close();
> }
>
> On the button I have the following:
> onClick="enlrge('/img/eng/upload/hdr_errors.gif',this.form)
_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]