Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q643 How can I display a variable in my HTML page, is the answer &{script-statements};?

irt.org | Knowledge Base | JavaScript | Misc | Q643 [ previous next ]

Q643 How can I display a variable in my HTML page, is the answer &{script-statements};?

Your talking JavaScript entities with &{JavaScript-code}; - which is only supported in Netscape Navigator, and they can only be used within the attributes of an HTML tags attributes, e.g.

<P>
Hello my name is
<FORM>
<INPUT TYPE="TEXT" VALUE="&{document.formname.fieldname.value}">
</FORM
</P>

To output the value of a form field within the page text flow can be achieved in all JavaScript enabled browsers with:

<P>
Hello my name is
<SCRIPT LANGUAGE="JavaScript"><!--
document.write(document.formname.fieldname.value);
//--></SCRIPT>
</P>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.