0

Sorry another silly issue with javascript but I am getting there.

Can someone please explain how I should write this thankd.
I tried stoping and restarting the string 'hello' +var 'more text';
maybe I am just too tired.

The variables are already defined.

document.getElementById('welcomeone').innerHTML='+firstnameval you have successfully created your account, a confirmation email has been sent to +emailval etc blah blah.'
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by shadiadiph
0
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script language="javascript">
function test()
{
	var firstnameval="Raja";
	var emailval="onsitetutor@yahoo.com";
	document.getElementById('welcomeone').innerHTML= firstnameval + " you have successfully created your account, a confirmation email has been sent to " + emailval +  " blah blah."
}
</script>

<body onLoad="test()">
<input type="text" name="firstnameval" value="Raja"/>
<div id='welcomeone'></div>
</form>
</body>
</html>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.