XaieL
11-27-2003, 12:01 PM
Bah, welcome to the land of the incoherent! Yep, that's me. I've started using Javascript (Today being my first day using it) I'm not quite proficient in it, as you'll soon see. I have simple code to create and I cant even do it. Need a little help.
I'm trying to create an html file with js to prompt the user for input of his/her name. THen display the "name + enjoy your visit" on the page. Also the name is supposed to be in: Italics, Bolded, Font = green, and Should be Uppercase.
Now i know this is extremely easy and I'm probably wasting all of your valuable time but I didnt know where else to turn :P Here's the Code, Now could someone either tell me how to fix it, what to add, or what I've done wrong so Far.
<html><head><title>Test</title></head>
<script language="Javascript">
<!--Hide Me
//create a prompt box
var name = prompt("Please Input Your Name", "");
var say = "enjoy your visit!";
//declare more variables
var name_say = name + say
var name_say_italic = name_say.italics();
var name_say_bold = name_say.bold();
var name_say_fontcolor("green")
var name_say_upper = name_say toUppercase();
//end hiding --)
</script>
</head>
<body>
<h1><b><i><font color="green">Hello</h1>
<script language="Javascript">
<!--Hide Me
//document write lines
document.writeln(name_say_bold + "<br>");
document.writeln(name_say_italics + "<br>");
document.writeln(name_say_upper + "<br>");
document.writeln(name_say_green + "<br>");
//show me --!>
</body>
</script>
</html>
Thanks a lot, Derek
I'm trying to create an html file with js to prompt the user for input of his/her name. THen display the "name + enjoy your visit" on the page. Also the name is supposed to be in: Italics, Bolded, Font = green, and Should be Uppercase.
Now i know this is extremely easy and I'm probably wasting all of your valuable time but I didnt know where else to turn :P Here's the Code, Now could someone either tell me how to fix it, what to add, or what I've done wrong so Far.
<html><head><title>Test</title></head>
<script language="Javascript">
<!--Hide Me
//create a prompt box
var name = prompt("Please Input Your Name", "");
var say = "enjoy your visit!";
//declare more variables
var name_say = name + say
var name_say_italic = name_say.italics();
var name_say_bold = name_say.bold();
var name_say_fontcolor("green")
var name_say_upper = name_say toUppercase();
//end hiding --)
</script>
</head>
<body>
<h1><b><i><font color="green">Hello</h1>
<script language="Javascript">
<!--Hide Me
//document write lines
document.writeln(name_say_bold + "<br>");
document.writeln(name_say_italics + "<br>");
document.writeln(name_say_upper + "<br>");
document.writeln(name_say_green + "<br>");
//show me --!>
</body>
</script>
</html>
Thanks a lot, Derek