is it possible to use a javascript function to create a text string and then use the return variable to fill in the value of the textarea in an html form?
This is the code.. (it and the website are very crude)
[code=html]<form name=”TheForm”>
<textarea name=”TheText” cols=”50″ rows=”4″ wrap=”VIRTUAL” readonly><table width="300" height="300" bgcolor="#000000" border="0"><tr><td><div align="center"><a href="http://www.hostdrjack.com" target="_blank"><embed src="http://www.hostdrjack.com/customcomments/samples/133a.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="272"></embed><br>www.hostdrjack.com</a> </div></td></tr></table>
</textarea>
<input name=”button” type=button onClick=”javascript:TheForm.TheText.focus();TheForm.TheText.select();” value=”Select Text”>
</form>
Since this code is repeated several times on the page, I would like to create a function that would create the string for the textarea. The variables passed to the function would be the filename, the width of swf file and the height of the swf file. The function would then add 25 pixels to the height and width and then return the string that goes in the text box.
this is the website [URL=http://www.hostdrjack.com]http://www.hostdrjack.com
Any directions would be greatly appreciated. Please keep in mind, I know some very basic javascript and no php. :rolleyes: