Jump to content

IMNOboist

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

IMNOboist's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm totally at a loss when it comes to OOP and classes. I would like to use the net_monitor PEAR package, but there's no documentation and I can't figure it out. What is the syntax for net_monitor? Specifically DNS and HTTP. Thanks so much!
  2. I figured it out. The script IS getting ahead of itself, so to speak. I guess Javascript just keeps going after the AJAX call. What I did was create a new function that checked the value of 'returnVals' and set a timeout on that function of 500. That way, the AJAX has time to get the response into the returnVals variable so when it gets checked, it knows what to do. Here's the resulting code: function ajax() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } return xmlHttp; } function returnAjax(getVars) { xmlHttp = ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById('returnVals').value = xmlHttp.responseText; } } strURL = "process.php?" + getVars; xmlHttp.open("GET",strURL,true); xmlHttp.send(null); } function checkSN(strSN,strDis) { returnAjax('action='+strDis+'&strSN='+strSN) setTimeout('checkSNReturn()',500); } function checkSNReturn() { if(document.getElementById('hidVals').value == 'true') { alert("Serial number already exists in Bound Book!"); } document.getElementById('hidVals').innerHTML = ''; }
  3. I have some AJAX code retrieving a result from a PHP script. Sometimes it works, sometimes it doesn't. I'm wondering if the script just gets ahead of itself somehow... I don't know. Here's the code: function ajax() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } return xmlHttp; } function returnAjax(getVars) { xmlHttp = ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById('returnVals').value = xmlHttp.responseText; } } strURL = "process.php?" + getVars; xmlHttp.open("GET",strURL,true); xmlHttp.send(null); } function checkSN(strSN,strDis) { returnAjax('action='+strDis+'&strSN='+strSN); if(document.getElementById('returnVals').value == 'true') { alert("This serial number already exists!"); } document.getElementById('returnVals').value = ''; } What happens is the user pushes a the submit button which triggers the "checkSN" function. I keep entering the same serial number (which already exists). Sometimes, the alert is triggered. Sometimes it isn't. What's the deal? Thanks in advance!
  4. Trouble-shooting steps I've already taken: -Moved database store (/var/mysql) to a different hard drive -Did repair on all tables in all databases -Triple-checked permissions
  5. I'm running MySQL 5.0.33 on OpenBSD 4.1 x64. I've been having some weird problems that I can't seem to find anything consistent about. First and foremost, it locks up occasionally, especially when a lot of people are using it. Second, I'm trying to create a database using an SQL script file, and it will create the database and the first few tables, but that's it. Then it fails saying: "ERROR 1005 (HY000) at line 109: Can't create table 'table_name' (errno: 9)" I'm wondering if there's a known problem with this version of MySQL or with this version on OpenBSD or on 64-bit OSes. Any ideas? I'd be happy to supply any information that would help.
×
×
  • 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.