Solved

Form In A Div

Posted on 2014-11-11
2
196 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses four methods for overlaying images in a container on a web page
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

744 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

17 Experts available now in Live!

Get 1:1 Help Now