Solved

Form In A Div

Posted on 2014-11-11
2
200 Views
Last Modified: 2014-11-13
I have a pop-up div.  I need to put a form in that div.  Where do I do this?
The Javascript.
 $(document).ready(function() {
        $("#thumbnail img").click(function(e){
 
            $("#background").css({"opacity" : "0.7"})
                            .fadeIn("slow");
 
            $("#large").html ("hello world")
                       .center()
                       .fadeIn("slow");
 
            return false;
        });

Open in new window


The Div
<div id="large"></div>

Open in new window


I tired this
<div id="large"><form><input name="Name" type="text" /></form>

Open in new window

It didn't work.
0
Comment
Question by:DS928
2 Comments
 
LVL 22

Accepted Solution

by:
Mrunal earned 500 total points
ID: 40436740
hi

Try this:

$('body').append('<form id="myForm"></form>');
$('#myForm').html ("hello world ...").center().fadeIn("slow");

Open in new window

0
 

Author Comment

by:DS928
ID: 40437553
Hello.  I tried it and it did not work.  Also the white box (Div) disappeared as well.
$(document).ready(function() {
        $("#thumbnail img").click(function(e){
 
            $("#background").css({"opacity" : "0.7"})
                         .fadeIn("slow");
 			$('body').append('<form id="myForm"></form>');
			$('#myForm').html ("hello world ...")
						.center()
						.fadeIn("slow");
            /*$("#large").html ("hello world")
                       .center()
                       .fadeIn("slow");*/
 
            return false;
        });

Open in new window


<div id="large">
   <form name="myForm">
   <input name="Name" type="text" />
   </form>
   </div>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now