I need a prompt to appear that asks the user to enter his/her name. The HTML page will then change based on their name.
This is what I have, but it doesn't work.
NOTE: this is not the whole HTML page, just the portion of the javascript code.
<script type="text/javascript" language="javascript">
<!--HIDE code from older browsers
var name=prompt("For personal service, please type your first name and click ok.","")
I then recall it in this code:
document.write("<h3>" + name +", to subscribe to our newsletter, fill out the form below.</h3>")
No prompts come up and I have tried changing the settings on IE.
This is what I have, but it doesn't work.
NOTE: this is not the whole HTML page, just the portion of the javascript code.
<script type="text/javascript" language="javascript">
<!--HIDE code from older browsers
var name=prompt("For personal service, please type your first name and click ok.","")
I then recall it in this code:
document.write("<h3>" + name +", to subscribe to our newsletter, fill out the form below.</h3>")
No prompts come up and I have tried changing the settings on IE.