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

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









Related Tutorials/Questions & Answers:
How can I dynamically load user-entered data as content of jquery dialog?
jQuery Load Content
Advertisements
jQuery Ajax load request
how can i print the selected content of a frame
how can i use ajax and jquery in netbeans ide
Calling In JavaScript Functions from HTML Form To Validate User Entered Data
How can I start big data?
How can I become a data scientist for free?
How can I become a good data scientist?
How can I get into big data?
How can I do data science course?
How can I become a data scientist?
How can I start data analyst?
How can I practice big data at home?
How can I become a data scientist in India?
How can I learn data science in India?
How to change the data in the table dynamically ?
How can I initialize the JSONArray and JSON object with data?
How can I get specific data from JSON
How can I learn Data Science from scratch?
How can I learn big data analytics online?
How can I learn Hadoop big data online for free?
How can I become a data scientist after BSC?
How can I start my career in data science?
How can I learn Data Science for free Quora?
How can I become a data scientist in 3 months?
How can I learn Data Science for free medium?
How Can I get ArrayList of Data from jsp with ajax request
how can i create a data grid - Java Beginners
load more with jquery
How can I get specific data from JSON
How to display user entered information using HTML and JavaScript
how to load a table of data from oracle, to a jsp page using hashmap.
How to read data dynamically from keyboard to array in flex
how to retreive data dynamically from mysql to drop down list
How to load elements from db when i press next.
How can I POST form data from a C#/ASP.NET to a remote website?
how to add data dynamically from database into a dropdown list in a jsp
How can I get experience in data science if no one would hire me?
How can I write a GUI stack program by Java to push Image files instead of other data type items?
Where can I study data science?
Can I become a data scientist with no experience?
Can I become a self-taught data scientist?
Can I learn Data Science in 6 months?
Can I teach myself Data Science?
Can I study data science after 12th?
Can I do data science after BA?
Can I do data science after BSC it?
Can I learn Data Science for free?
Can I become a data scientist in 6 months?

Ads