It's not clear what exactly you are trying to achieve and why would you try to show empty alert dialog box. Your data structure above suggests that you are trying to prompt the user for entering name and e-mail. Javascript
alert
is not suitable for prompts; it is merely the alert which is hardly good enough for the use in well-developed UI.
It would be the best to avoid any promptс at all. This is quite possible in most cases. You can put input controls just on the page and let the user fill them and click on some "Submit" button whenever this person is ready. However, if your really want to show a real prompt, with some modal behavior, you can use, for example, jQuery
Dialog
instead:
http://jqueryui.com/dialog[
^].
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com[
^],
http://learn.jquery.com[
^],
http://learn.jquery.com/using-jquery-core[
^],
http://learn.jquery.com/about-jquery/how-jquery-works[
^] (start from here).
—SA