The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
ajax help pease
i need help with this code if theres any Ajax coders on here this is my grabbing script with grabs the content without a page refresh. it was working a charm on vB3 but since i updated to vB4 its not working something to do with it not working on XHTML can anyone help me out PLEASE need to get it back up urgent
Template Code: HTML Code:
<script type="text/javascript"> function ax() { if(document.getElementById('btnS').value=="Fill") { document.getElementById('txtTitle').value = ""; document.getElementById('image').value = ""; document.getElementById('infolink').value = ""; document.getElementById('summary').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('image').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('infolink').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) { xd.onreadystatechange = function() { if (xd.readyState == 4 && xd.status == 200) { document.getElementById('summary').value = xd.responseText; document.getElementById('btnS').value="Fill" } } document.getElementById('btnS').value="Filling..."; xd.open("POST", "getinfo.php?purl="+uri+"&preq=desc", true); xd.send("purl="+uri+"&preq=desc"); } } </script> <form> <table border="0" cellpadding="1" cellspacing="1"> <tr> <td> <b>Quick Fill:</b><br /> <input class="url" type='text' size='40' name='url' id='url' value="" /> <input type='button' id="btnS" value='Fill' onclick="ax(this);" /> </td> </tr> </table> <div><input class="title" type="text" size="40" id="txtTitle" name="name" value="" /></div> <div><input class="url" type="text" maxlength="1000" size="40" name="info" id="info" value="" /></div> <div><input class="img" type="text" maxlength="1000" size="40" name="image" id="image" value="" /></div> </form> PHP Code:
* BUMP * can anyone help me with this code please. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|