Solved

Form In A Div

Posted on 2014-11-11
2
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 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