Results 1 to 3 of 3
Related
-
is there a difference between <script language="javascript> and <script type="text/javascript"> Forum: Javascript Forum
Replies: 8 -
input type=hidden name="to" VALUE="user@yahoo.com" Forum: HTML Forum
Replies: 1 -
how can i only make "one" link turn to another color when hovered(mouse moves to it)? Forum: CSS Forum
Replies: 5
-
01-05-2004, 01:14 PM #1
help with "string" value from object
I would like to display text from an external *.js file function within a section on a page.
External function in terms.js:
function fillTextArea(){
var terms;
terms = "You will heed and obey";
return terms;
}
Page code snippets:
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" onLoad="document.tForm.tc = fillTextArea();">
<form name="tForm">
...
<SCRIPT LANGUAGE="JavaScript1.2">document.write( document.tForm.tc )</script>
...
I have been able to load <textarea name="tc"> successfully so I'm inclined to think I have an issue with "string value" vs "object".
I have tried tc.value, etc to no avail. I've tried <span id="tc"> and failed also.
I am obviously grasping at straws so any help would be appreciated.
W.
-
01-05-2004, 01:57 PM #2
Without knowing more about what your end goal is, wouldn't this work?
Code:<SCRIPT LANGUAGE="JavaScript1.2">document.write( fillTextArea() )</script>
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
01-05-2004, 02:08 PM #3
DOH!
Right on the money, Dean.
Thanks alot!
I have an external *.js file with our "terms and conditions" loaded into a variable. Currently filling a textarea from it. Now I'm just trying to see if I could use that same code to display within a page as table data, rather than in a textarea box.
W.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum