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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

call function in document.write????

Status
Not open for further replies.

fozzy

MIS
Oct 22, 2001
2
CA
Can anybody help me to spot the problem.
Im trying to call a function called TALISTING() in a document.write. All its doing is displaying the the function's name TALISTING()?

-----------------------------------------------------

document.write(&quot;<table width='468' border='0' cellspacing='0' cellpadding='0' height='30'><tr align='right' valign='top'><td height='30' width='251' bgcolor='#b5c0ca'>&quot;);
document.write(&quot;TALISTING()</td></tr></table>&quot;);
 
You have to tell tailsting to return the value you are looking for. e.g.

<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
function makeText(){
mytext=&quot;hello&quot;
return mytext
}

document.write(makeText())
</script>

 
P.S.
Don't enclose the function's name in quotes. do this instead:

document.write(TALISTING() + &quot;</td></tr></table>&quot;);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top