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.'
Member Avatar for rajarajan2017
<!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>

thanks rajarajan07

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.