How should I format the ajax request html files?

Im using jquery UI tabs with ajax. I was wondering if the files that the ajax calls are about to extract need to be formatted starting with <html>

or only the minimal possible html reason it will inject into an already formatted valid xhtml file .... Hope I am myself Clean. Thanks in advance.

+2


source to share


3 answers


If you are going to inject what you get from the server directly into the DOM, you need a piece of HTML. Something like

<div>This is something <strong>injected</strong></div>

      



preferable

<html><body><div>This is something <strong>injected</strong></div></body></html>

      

+1


source


Minimal html. All examples on the jquery UI tab page use HTML snippets.



0


source


You should be able to pop the HTML exactly the way you would like it to fall into place (i.e. no need to insert tags).

0


source







All Articles