That depends on when you want to write it and again depending on that, what you want to write. Can you please point out whether you want to write to the div while the page is loading and - if this is not the case - what you want to write?
@age13kidauthorFeb 10.2005 — #well heres the thing i want to wright it as soon as the page loads ... can it also write links? and variablse that i made?
@age13kidauthorFeb 10.2005 — #actually i want it to work like this: the script is at the very top of the page and it writes to a <div> tag with the variable and writes the link.
@PittimannFeb 10.2005 — #Are you sure, you don't want to write something somewhere dynamically after page load? I guess, your direction should be closer to what Fang posted than to my suggestion.
Simply place the script between an opening and a closing div tag:[code=php]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Example</title> </head> <body> <div> <script type="text/javascript"> firstpart = "travist120"; secondpart = "gmail.com"; textshown = "Email Me2"; var email = firstpart+"@"+secondpart; document.write("<a href="mailto:" +email+ "">" +textshown+ "</a>this is javascript<br><br>"); </script> </div> </body> </html>[/code]Cheers - Pit