Please Scroll Down to See Forums Below
napsgear
genezapharmateuticals
domestic-supply
puritysourcelabs
UGL OZ
UGFREAK
napsgeargenezapharmateuticals domestic-supplypuritysourcelabsUGL OZUGFREAK

Javascript bors...

Ganryu

Well-known member
Hey orbs, anyone here good at javascript?

Write a script that reads a first name and a last name from the user as two separate inputs and concatenates the first name and the last name separated by a space. Output HTML text that displays the concatenated name in the HTML document.

Write a script that inputs three integers from the user and displays the sum, average, product, smallest and largest of these numbers in an alert dialog.

Any help appreciated. I can't seem to get the first one to work at all.
 
Come on, I know someone can help. The ONE TIME Cipherlock MIGHT be of some good, and he is nowhere to be found.
 
Hi. I have nothing constructive to say. Just thought I'd get your hopes up when you see that someone has replied to your thread.
 
save the following text in a file, for example name.htm. This isn't strict html with dtd's etc so it might not pass W3C validation but IE will render it fine so it's all you really need.


<script>
fname = prompt("What's your first name?");
lname = prompt("What's your last name?");
document.writeln(fname + " " + lname);
</script>
 
Yeah, Cipher. If you have time. For some reason, when I use the window.prompt command, it won't work. I am just starting in this scripting shit, and my prof sucks. Any guidance you can give would be great. Thanks.
 
Top Bottom