HCProfessionals Posted March 29, 2011 Share Posted March 29, 2011 I would like to convert this to ajax and use a div rather than an iframe. <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> Website: http://<input type="text" name="link" size="25"> <input name="submit_link" type="submit" value="Load"> </form> <?php if ($_POST['submit_link']){ $url = $_POST['link']; echo "<iframe src ='http://$url' width='100%' height='600px;'></iframe>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/232062-load-in-div-rather-than-iframe/ Share on other sites More sharing options...
corbin Posted March 29, 2011 Share Posted March 29, 2011 Loading a page into a div is about as simple as AJAX gets, so I would find an AJAX tutorial. Or is there something specific that you're having issues with? Quote Link to comment https://forums.phpfreaks.com/topic/232062-load-in-div-rather-than-iframe/#findComment-1193823 Share on other sites More sharing options...
Maq Posted March 29, 2011 Share Posted March 29, 2011 I would also suggest using some sort of framework such as JQuery, specifically - http://api.jquery.com/load/ Quote Link to comment https://forums.phpfreaks.com/topic/232062-load-in-div-rather-than-iframe/#findComment-1193825 Share on other sites More sharing options...
HCProfessionals Posted March 29, 2011 Author Share Posted March 29, 2011 An offsitelink, not external on the same domain. Should have better specified, and no, I am not looking to use a proxy to do so. Quote Link to comment https://forums.phpfreaks.com/topic/232062-load-in-div-rather-than-iframe/#findComment-1193925 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.