Re: Write. function
- From: "RobG" <rgqld@xxxxxxxxxxxx>
- Date: 31 Aug 2006 02:44:03 -0700
cass27 wrote:
I am just doing a course on Javascript and have begun to try out
different ideas. The effect I wanted was fro the user to click on a
graphic. Aprompt box would apprear asking their name and that imfo
would be transferred to the top of that page. However the users name
will only appear on a seperate page.
Tip 1: after the page has finished loading, document.wirte first calls
document.open, which clears the current page before writing the new
content.
The code i am using (in brief) is as follows:
function getname()
{
myname = prompt("What is your name?","");
document.write("<font size 3>Welcome</font>");
Tip 2: use a modern version of HTML. The font element was deprecated
in 1997 with HTML 4.0.
[...]
does anyone know how I cn get the users name to appear on the same page
(without using text box)? Maybe it cant be done using javascript.
Tip 3: learn about getElementById and how to change the value of a text
node.
Start with the FAQ:
<URL: http://www.jibbering.com/faq/#FAQ4_15 >
Continue at quirksmode:
<URL: http://www.quirksmode.org/ >
--
Rob
.
- Follow-Ups:
- Re: Write. function
- From: cass27
- Re: Write. function
- References:
- Write. function
- From: cass27
- Write. function
- Prev by Date: Re: display none/block for nested elements
- Next by Date: Re: Write. function
- Previous by thread: Re: Write. function
- Next by thread: Re: Write. function
- Index(es):
Relevant Pages
|