views:

67

answers:

3

Im using jquery UI's tabs with ajax. I was wondering if the files that the ajax calls are gonna retrieve are supposed to be formatted starting with <html> or just the minimal html possible cause its gonna be injected into an already formatted valid xhtml file.... I hope Im making myself clear. Thanks in advance.

A: 

Minimal html. All the examples on the jquery UI tabs page use HTML shards.

seth
+1  A: 

If you're going to inject what you receive from the server directly into the DOM, you'll want an HTML snippet. Something like

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

is preferred over

<html><body><div>This is something <strong>injected</strong></div></body></html>
Randolpho
A: 

You should be able to spit out the HTML exactly as you would want it dropped in to place (i.e. enclosing tags are not necessary).

Adam Batkin