Get user value before post
<p>Users can make a painting on my site with jquery drag and drop.</p>

<p>To save the content i use.</p>

<pre><code>$('#mksave').click(function(){

    $("#topmenu").animateHighlight("#a7bf51", 4000);
    var div_contents = $("#print").html();
    $.post("save.php", { 'contents': div_contents });
    alert('Your painting is saved');
})
</code></pre>

<p>Here i take the content form div print and save it via the save.php file.</p>

<p>Everything is working so far.</p>

<p>What i want to do is when the use klicks mksave (so the funtion will run) the user gets asked to give a name for the painting and after that i'm going to send the variable with post.</p>

<p>So there must be some kind of alert screen wich ask for a title.</p>

<p>The question is how can i get the alert screen with text field an save the given input in a var so the code will be like:</p>

<pre><code>$('#mkopslaan').click(function(){

    $("#topmenu").animateHighlight("#a7bf51", 4000);
    var div_contents = $("#print").html();

    var name = //return value from user input
    $.post("save.php", { 'contents': div_contents,  'name': name });

    alert('Your moodboard has been saved.');        
})
</code></pre>

<p>So i don't want the name textbox always visible but only in a box wich apears on the click.</p>

<p>Edit i wasn't clear.</p>

<p><strong>The user MUST enter a name.</strong></p>
