Solved

Javascript - insertAdjacentHTML Problem

Posted on 2007-03-18
1
180 Views
Last Modified: 2008-02-20
How do I get it to not finish the tags?

For instance I am trying to insert a form around some content but when I add the form attribute it closes it right after...

0
Comment
Question by:B_Dorsey
1 Comment
 
LVL 9

Accepted Solution

by:
pallosp earned 500 total points
ID: 18743497
You can only do it in two steps:

1. Create a <form> element and insert it somewhere into the document
    (http://developer.mozilla.org/en/docs/DOM:document.createElement)
2. Iterate over the content and insert it inside the <form> tag
    (http://developer.mozilla.org/en/docs/DOM:element.appendChild)
    The appendChild() method removes the node from its previous place.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use embargo Date/time in php 29 38
ASP.net Show "please wait " message as page loads 2 42
Jquery GMAP3 Hierarchy 1 27
How to convert from xls to xlsx using java 7 39
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

773 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