Search Results

Search found 8 results on 1 pages for 'tecbrat'.

Page 1/1 | 1 

  • Generalized Ajax function [migrated]

    - by TecBrat
    Not sure if this question will be considered "off topic". If it is, I'll remove it, but: I hadn't see this yet so I wrote it and would like to know if this is a good approach to it. Would anyone care to offer improvements to it, or point me to an example of where someone else has already written it better? function clwAjaxCall(path,method,data,asynch) { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } if(asynch) { xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { //alert(xmlhttp.responseText); //var newaction=xmlhttp.responseText; //alert('Action becomes '+newaction); return xmlhttp.responseText; } } } if(method=='GET'){path=path+"/?"+data;} xmlhttp.open(method,path,asynch); if(method=='GET'){xmlhttp.send();}else{xmlhttp.send(data);} if (!asynch){return xmlhttp.responseText;} } I then called it like Just Testing <script type="text/javascript" src="/mypath/js/clwAjaxCall.js"></script> <script type="text/javascript"> document.write("<br>More Testing"); document.write(clwAjaxCall("http://www.mysite.com",'GET',"var=val",false)); </script>

    Read the article

  • Should all foreign table references use foreign key constraints

    - by TecBrat
    Closely related to: Foreign key restrictions -> yes or no? I asked a question on SO and it led me to ask this here. If I'm faced with a choice of having a circular reference or just not enforcing the restraint, which is the better choice? In my particular case I have customers and addresses. I want an address to have a reference to a customer and I want each customer to have a default billing address id and a default shipping address id. I might query for all addresses that have a certain customer ID or I might query for the address with the ID that matches the default shipping or billing address ids. I'm not sure yet how the constraints (or lack of) will effect the system as my application and it's data age.

    Read the article

  • Loose typing not applied to objects

    - by TecBrat
    I have very little experience working with classes and object. I work in a loosely typed language, PHP. I was working with a SimpleXML object and ran into a problem where I was trying to do math with an element of that object like $results->ProductDetail->{'Net'.$i}; If I echoed that value, I'd get 0.53 but when I tried to do math with it, it was converted to 0 Is there a reason that a loosely typed language would not recognize that as a float and handle it as such? Why would "echo" handle it as a string but the math fail to convert it? Example: $xml='<?xml version="1.0" encoding="UTF-8" ?>'; $xml.='<Test> <Item> <Price>0.53</Price> </Item> </Test>'; $result=simplexml_load_string($xml); var_dump($result->Item->Price); echo '<br>'; echo $result->Item->Price; echo '<br>'; echo 1+$result->Item->Price; echo '<br>'; echo 1+(float)$result->Item->Price; Output: object(SimpleXMLElement)#4 (1) { [0]=> string(4) "0.53" } 0.53 1 1.53

    Read the article

  • Is there any way to prevent Googlebar from breaking Friendly 404s

    - by TecBrat
    This might be considered a continuation of this question. If I output HTML after my 404 header, It displays properly in IE and FF unless the user has Google bar instaled. If I try header('HTTP/1.x 404 Not Found'); header("Location: http://www.example.com/?content=404_error"); die(); then I'm getting 302 from the redirect. It seems to overrule the 404 Supposedly if your output is larger than 512 bytes, the toolbar isn't supposed to override the page, but It seems to do it anyway. I found a setting in Google's Toolbar that said "Provide suggestions on navigation errors". Turning that off provides me with the behaviour I want my visitors to experience. Does anyone know if Google provides a way for a developer to over-ride that setting for all visitors?

    Read the article

  • ibm 8305-29u Sound comes from internal speaker instead of green port - Ubuntu 10.04 LTS

    - by TecBrat
    The title pretty much says it all. My experience w/ubuntu is VERY limited. I did find the system test feature and ran an audio test. It found my device as Intel 82801DB-ICH4. I wasn't getting anything. I tried a couple of things and don't really even remember what I tried, but I started getting audio (not just beeps) from the system's internal speaker. Any ideas? (I can't rule out a hardware problem. This box sat under my bed for a couple of years and it's first life was in an environment FULL of cement dust.)H

    Read the article

  • TextPad printing to incorrect printer

    - by TecBrat
    I have tried to find an answer on Google, and searched SU, but have not found anything on this particular issue. I Looked for a setting in the TextPad menu and didn't see anything that seemed relevant. I have 2 networked printers that are the same model. (HP LaserJet 2200 Series PCL 5) One is near me and the other is across the building. The one near me is my default. It seems that TextPad remembers the last printer used and defaults to it rather than printing to the system default, so when I force it to print to my default printer once, the problem is solved until I decide to print to the other printer for some reason. If I don't remember the problem, and specifically print a job to the nearby printer to correct it, I'll end up either wasting paper or wasting trips across the building to pick up printjobs that got printed there by accident. Has anyone else noticed this problem? Is there a solution?

    Read the article

  • What causes "system call failed" and there are hanging ie processes?

    - by TecBrat
    System: Windows 7 Home Premium IE: 11.0.9600.17107 When I have had many, many apps and windows open, sometimes I'll try to access a folder and get a dialog that says "System Call Failed". I have found the fix for it is to open the task manager and End Process Tree on iexplore.exe and iexplore.exe *32. Often times there will be several of these even when I have closed all my browser windows. Does anyone have any experience with this error?

    Read the article

  • Temporarily block other users from network printer

    - by TecBrat
    I found where someone else asked this question here, but they did not get a working answer. We have a printer that is shared. It has it's own network card, so we all have equal access to it. (none of our computers owns it) One of our users needs to print on specialty paper and we need to be sure not to print when that paper is in the printer. Our current method is "Hey, don't print anything right now!" Obviously this method is not preferred because it does not enforce itself. :-) I think all our PCs are running Win7 Home. The printer in question is an HP Laserjet 2200. Is there a way that we can make this happen?

    Read the article

1