headhair Posted September 27, 2011 Share Posted September 27, 2011 I have two div ids, say sidelink & formData Sidelink contains a link (<a href> tag. When that link is clicked on, I need to load a form.php file (resides in the same server) into the formData div. The form.php contains form details to be submitted. Is is possible to load the form.php file (not the content of form.php) using only AJax? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/247946-loading-php-file-into-div-tag/ Share on other sites More sharing options...
ManiacDan Posted September 27, 2011 Share Posted September 27, 2011 You can execute the page, capture the result, and fill the DIV with the HTML of the result. You could also use an iframe and simply use JS to reset the src attribute. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/247946-loading-php-file-into-div-tag/#findComment-1273226 Share on other sites More sharing options...
headhair Posted September 28, 2011 Author Share Posted September 28, 2011 Thanks for reply Mr. ManiacDan That's what I just wanted to do. But let me know how to capture the HTML output. I have a select box that is populated using MySQL while loading PHP file. I could ajax the page. But the Select box is empty. help needed. Quote Link to comment https://forums.phpfreaks.com/topic/247946-loading-php-file-into-div-tag/#findComment-1273515 Share on other sites More sharing options...
ZulfadlyAshBurn Posted September 29, 2011 Share Posted September 29, 2011 Use jQuery. Quote Link to comment https://forums.phpfreaks.com/topic/247946-loading-php-file-into-div-tag/#findComment-1273887 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.