This topic contains 2 replies, has 2 voices, and was last updated by goldie 9 years, 1 month ago.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Navigation › Tabs › How to load the ajax page so that it query database and display data in that tab
This topic contains 2 replies, has 2 voices, and was last updated by goldie 9 years, 1 month ago.
Hello,
I am not proficient with jqwidget or jquery so please excuse this question.
It might be an easy solution and I am just going about it wrong.
When the tab is calling the content of the ajax page, how can the content of that ajax being formatted with CSS or query from a database using PHP and then display the content.
Whatever I made in the ajax1.php such as <div id=”class1″ style=”margin: 10px”>Test</div> or <?php echo “<h1>hello world</h1>”; ?>.
When it load the content of this ajax1.php, it literally just split out the code as it without rendering the CSS style or PHP code to print out “hello world”.
Hello goldie,
Please take a look this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtabs/ajaxloading.htm?arctic
Below is one workaround.
In source code focuse on ‘$(‘#content’ + tabIndex).text(data);’ and change with $('#content' + tabIndex).html(data);
in loadPage function.
This could help in a described situation (with integrated styles – “ajax1.php”).
Best Regards,
Hristo Hristov
jQWidgets team
http://www.jqwidgets.com
Hristo,
Yes, that is what it was. I needed to change it to $('#content' + tabIndex).html(data);
.
What are the other options beside .text(data) and .html(data)?
THANK YOU!
You must be logged in to reply to this topic.