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?
jQuery Load Content
Advertisements
how can i print the selected content of a frame
how can i use ajax and jquery in netbeans ide
How can I start big data?
How can I practice big data at home?
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 become a data scientist in India?
How can I learn data science in India?
How can I start data analyst?
jQuery Ajax load request
Calling In JavaScript Functions from HTML Form To Validate User Entered Data
How can I learn Hadoop big data online for free?
How can I learn Data Science for free Quora?
How can I learn Data Science from scratch?
How can I become a data scientist in 3 months?
How can I learn Data Science for free medium?
How can I learn big data analytics online?
How can I become a data scientist after BSC?
How can I start my career in data science?
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 do it? .click();
How can I get experience in data science if no one would hire me?
How can I learn Java?

Ads