Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference an InputBox on a JSF

Status
Not open for further replies.

SDyke

MIS
Oct 13, 2005
55
US
I have javascript firing from an onclick event:

the script:

<script type="text/javascript">
function showAlert(cForm){
alert("test");
document.cForm.getElementById('text7').value = "C:\\testagain123.rtf"
}

I get the error that 'document.cForm' is not an object or is null. If I take out the document part I get a message that Object does not support this property or method.
 
Hi

And what is cForm in reality ?

Anyway, the [tt]id[/tt]s are unique for the entire document, so just use :
Code:
document.getElementById('text7').value = "C:\\testagain123.rtf"

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top