manalnor Posted March 31, 2011 Share Posted March 31, 2011 Hello dear friends, I've been all time thinking how to make widgets (what is this ?!) i mean want to make normal <form> where you can submit any entry through <input> and it submit its data to another website then get the results and show it to you. here is an example <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript" src="ajax.js"></script> <form id="shorturl" name="shorturl" method="post" action="2.php"> <p><input type="text" name="url" value="http://" /></p> <p><input type="submit" name="submit" value="Get Key" /></p> </form> <div id="log_res"><!-- spanner --></div> view example (it is empty site not spamming) : www.shockingfacts.info when you add anything in the input , it will gets key now what if i write this form code to another website such as <script type="text/javascript" src="http://shockingfacts.info/mootools.js"></script> <script type="text/javascript" src="http://shockingfacts.info/ajax.js"></script> <form id="shorturl" name="shorturl" method="post" action="http://shockingfacts.info/2.php"> <p><input type="text" name="url" value="http://" /></p> <p><input type="submit" name="submit" value="Get Key" /></p> </form> <div id="log_res"><!-- spanner --></div> view example (it is empty site not spamming) : www.shockingfacts.info but it won't work so is there any way that can send post and get results over another website. here is the ajax js code window.addEvent('domready', function() { if (!window.demo_path) window.demo_path = ''; var demo_path = window.demo_path; $('shorturl').addEvent('submit', function(e) { e.stop(); var log = $('log_res').empty().addClass('ajax-loading'); this.set('send', {onComplete: function(response) { log.removeClass('ajax-loading'); log.set('html', response); }}); this.send(); }); }); hope you can give me any refer or how to do it <send data ---><--- get results> thank you so much Quote Link to comment https://forums.phpfreaks.com/topic/232239-is-it-possible/ Share on other sites More sharing options...
manalnor Posted March 31, 2011 Author Share Posted March 31, 2011 if anyone has any idea how to do such things please share it or give keywords or any tutorials links thanks Quote Link to comment https://forums.phpfreaks.com/topic/232239-is-it-possible/#findComment-1195046 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.