Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/232239-is-it-possible/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.