Note that there are some explanatory texts on larger screens.

plurals
  1. POPreview pop-up window using JQuery
    text
    copied!<p>I am doing an application like a Form builder.</p> <p>I am having a design page where I am generating the Fields using JQuery and displaying them each in a Div in the Preview panel of the same page.</p> <p>In my code I am saving all the Fields in the Form by iterating through all the Divs in the Preview panel.</p> <p>Now I want to add a functionality to show all the Divs in the preview panel in a pop - up window like when I click the Save Form button it must show all those DIvs in the Preview panel in the Window like a Preview and then it has to save the Form .</p> <p>How to include the Preview option in the Code also to show the preview in a pop-up window?</p> <p>My code to save the Form is like:</p> <pre><code> $("#fb_contentarea_col1down21 div").each(function() { var checked="false"; var id=$(this).attr("id"); //var fname=$("#label"+id+"").text(); var fsize=$("#input"+id+"").width(); var ftype=$("#input"+id+"").attr('data-attr'); var finstr=$("#instr"+id+"").text(); var fname=$("#label"+id+"").clone().html().replace(/&lt;span.*/,''); if($("#label"+id+"&gt; span.req").length &gt; 0) { checked="true"; } $.ajax({ type: "POST", url: "http://localhost/FormBuilder/index.php/forms/saveField", </code></pre> <p>data: "sequence_no="+id+"&amp;name="+fname+"&amp;type="+ftype+"&amp;size="+fsize+"&amp;instr="+finstr+"&amp;formid="+getformid+"&amp;required="+checked,</p> <pre><code> success: function(msg){ //alert( "Data Saved: " + msg); }//success });//ajax });//Loop </code></pre> <p>My fb_contentarea_col1down21 has all the Divs showing all the Fields of my Form.</p> <pre><code>I am iterating through it and saving all the Fields. </code></pre> <p>How to make all these to show like a preview in a pop-up window using JQuery.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload