View Full Version : javascript help please

10-13-2006, 10:47 AM
Can you help me with some javascript please.

So far I have some code to return a value from a java applet into a readonly textfield.

Basically what I need is when the submit button is pressed the document.applets[0].getLHost()); gets the value from the applet and passes it to a hidden textfield which is then posted to the next page.

I think the document.applets[0].getLHost()); needs to be used in some onSubmit code in the header. And then that value is dynamically updated in the hidden field. but not sure how to do this
Any help is greatly appreciated.

<applet code="support" width="500" height="600" align="top">

<form name="form1" method="post" action="nextpage.asp">
<script type="text/javascript">
document.write('<input type="text" name="textField" readonly value="');
<input name="Submit" type="button" value="Submit">

10-13-2006, 11:22 AM
Im thinking it should be something like this but ist not working.. if anyone can help?

<script language="JavaScript">
function getValue(obj){
var textBox = document.getElementById (obj)
textBox.value =document.applets[0].getLHost();

<applet code="support" width="500" height="600" align="top">

<form name="form1" method="post" action="nextpage.asp" onsubmit="getValue('SumBox')">

<input type="text" name="Price" id="SumBox" value="0" size="5" readonly>
<input name="More Info" type="button" value="More Info">

10-13-2006, 04:08 PM
Can you post a link to the page? Are you sure you are even getting a value from the applet? Try alerting the applet value.