How can I dynamically load user-entered data as content of jquery dialog?

Ads
 

How can I dynamically load user-entered data as content of jquery dialog?

Hi I can't seem to work my javascript. I cannot seem to figure out whatelse I am missing. Kindly guide me how to solve my project please. I cannot make the value of user-entered name to show in the dialog content. I am also trying to echo this from a php file where my form is validated. Below is my code. Thanks in advance.

<?php
echo " <script type=\"text/javascript\">
    function showDialog(){

        var visitorName = $('#firstName').val();
        var myDialog = $('#acknowledge').dialog();

        myDialog.dialog({
            autoOpen:false,
            modal:true,
            buttons:{
                Close:function(){
                    $(this).dialog('close');
                    }
                    },
            title:'Form sent',
            height:'auto',
            hide:{
                effect:'explode', 
                duration:1000
                }

            });


            myDialog.dialog('open');
            myDialog.html(visitorName); 


    }
    showDialog();
    </script>";
?>
View Answers

Ads









Related Tutorials/Questions & Answers:
How can I dynamically load user-entered data as content of jquery dialog?
how can i print the selected content of a frame
Advertisements
how can i use ajax and jquery in netbeans ide
jQuery Ajax load request
Calling In JavaScript Functions from HTML Form To Validate User Entered Data
How Can I get ArrayList of Data from jsp with ajax request
How to change the data in the table dynamically ?
How can I POST form data from a C#/ASP.NET to a remote website?
how should i can solve
How can I write a GUI stack program by Java to push Image files instead of other data type items?
How can I do it? .click();
How can I learn Java?
Please tell me how I can access a field (data type char) of resultset in a java class
how to load a table of data from oracle, to a jsp page using hashmap.
how to retreive data dynamically from mysql to drop down list
How to read data dynamically from keyboard to array in flex
load more with jquery
how to add data dynamically from database into a dropdown list in a jsp
How to load elements from db when i press next.
How to display user entered information using HTML and JavaScript
How I can cast a variable in Scala?
How I can cast a variable in Scala?
how can i add hibernate plugin to eclipse?
how i can get jqfade.js library
how can i display a pdf file in a jtextarea
how can i remove newline characters and tabs
how can i make monthly register ?
how can i display a editable result of form?
how can i create a discussion forum?
How can I learn Java in 5 minutes
How can i search and insert within a query

Ads