Loading HTML into <div> with jQuery-ajax

Posted by ehehhh on Stack Overflow See other posts from Stack Overflow or by ehehhh
Published on 2010-03-29T12:50:00Z Indexed on 2010/03/29 12:53 UTC
Read the original article Hit count: 506

Filed under:
|
|

Hello everyone, I ran into a bit of trouble while trying to load an external HTML page into a div using jQuery-ajax. I had this div: <div id="content"></div> and wanted to fill it with $("#content").load("include/add.html"); It loads the HTML file perfectly, but inside that add.html is a button that should load add2.html(also using .load), but it seems that neither the button nor the datepicker in that file won't work. I'm guessing the .load function is responsible for that?

This is the content of add2.html:

<p>Nr: <input type="text"></input></p>
<p>Name: <input type="text"></input></p>
<p>Date: <input type="text" id="datepicker"></input></p>
<a href="#" id="button1">Next</a>

Please help, I'm desperate :D

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jquery-ajax