Need Small Script.... 2

hi what i am trying to do is have a main field on a form with a fill button next to it and the rest of the form is uneditable. the main box is a url box and if a member adds a url to it and clicks the fill form button or even if it grabs the info while it is typed into the input field i want it to run a php function i have made and return the results into the rest of the form using ids and then once it has filled the form they can click submit and post the form.

i would prefer this in AJAX if possible so it fills the results in real time.

can anyone help.

i have had these suggestions

Quote:
you will need to either convert the PHP to javascript some how, consider submiting the info via ajax and parsing an XML response or submit the file twice, once to process the PHP, once for the actual submit. unfortunately, that's the best option since it offers the most accessibility.

Quote:
simple have the form submit to one page that runs the script, and at the same time configures the new action atribute of the form to the page to do your other stuff.

and also i would like a quote to convert it into a vbulletin plugin. thats 1 price for the job and the exatra price for vbulletin plugin.

this was originally made for me some years back but lost the actual file getinfo.php that has the grabber code to grab imdb info then it uses the following js code

<script type="text/javascript">

function ax()
{
if(document.getElementById('btnS').value=="Fill")
{
document.getElementById('txtTitle').value = "";
document.getElementById('nzbimage').value = "";
document.getElementById('nzbinfolink').value = "";
document.getElementById('vB_Editor_001_textarea').value = "";

axtitle();

aximg();
axlink();
axdesc();
}
}

function axtitle()
{
var uri = document.getElementById('url').value;

var xt = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
if (xt)
{
xt.onreadystatechange = function()
{
if (xt.readyState == 4 && xt.status == 200)
{
document.getElementById('txtTitle').value= xt.responseText;
document.getElementById('btnS').value="Fill"
}
}
document.getElementById('btnS').value="Filling...";
xt.open("POST", "getinfo.php?purl="+uri+"&preq=title", true);
xt.send("purl="+uri+"&preq=title");
}
}

function aximg()
{
var uri = document.getElementById('url').value;

var xi = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
if (xi)
{
xi.onreadystatechange = function()
{
if (xi.readyState == 4 && xi.status == 200)
{
document.getElementById('nzbimage').value= xi.responseText;
document.getElementById('btnS').value="Fill"
}
}
document.getElementById('btnS').value="Filling...";
xi.open("POST", "getinfo.php?purl="+uri+"&preq=img", true);
xi.send("purl="+uri+"&preq=img");
}
}

function axlink()
{
var uri = document.getElementById('url').value;

var xi = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
if (xi)
{
xi.onreadystatechange = function()
{
if (xi.readyState == 4 && xi.status == 200)
{
document.getElementById('nzbinfolink').value= xi.responseText;
document.getElementById('btnS').value="Fill"
}
}
document.getElementById('btnS').value="Filling...";
xi.open("POST", "getinfo.php?purl="+uri+"&preq=link", true);
xi.send("purl="+uri+"&preq=link");
}
}

function axdesc()
{
var uri = document.getElementById('url').value;

var xd = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
if (xd

Search All Jobs:

Job Details

  • Job Type
  • Fixed Price Job
  • Budget
  • $10-$35
  • Start Date
  • 05/10/2012 02:24:14 PM
  • Job Status
  • Job Expired