Jump to content

Andrew K.

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Andrew K.

  1. className should work just fine.
  2. Hehe, that really lit up my day.
  3. It takes as much effort to do XHTML instead of HTML, why do it wrong and risk losing your page display due to the progression of browsers and loss of support for old coding languages or when in the future you need to showoff a webpage for a job or something, nobody will be impressed that you made a page in HTML when there are millions of other people that can make a page in XHTML.
  4. I completely mis-understood what he wrote, I've been doing that quite alot lately...
  5. Why not just sanitize the input from the server side before putting it in the database?
  6. Try changing document.getElementById('object').style.left="400"; to document.getElementById('object').style.left="400px"; I dunno if it will work, but it should.
  7. I believe document.body.clientHeight and document.body.clientWidth will work.
  8. Okay so I'm using ColdFusion and I'm trying to insert a date into a database.I got the Error Executing Database Query. error and I look at my query and it only makes sense that the date is being entered wrong because the only other values I am entering are numbers and I know how to enter them.So what is the correct way to insert a date (ex. #now()#) into a database?
  9. myElement.onresize = function() { //Write code here}
  10. Correct me if I am wrong but isn't it possible to reference it like this? document.formname.elements["dropdownboxname[]"] ?If you want to make an option selected just do this: document.getElementById("228").selected = 'true' But first you'll have to fix up the id's on those option tags because an id can only be used once per page.
  11. if(document.getElementById('id')) { //do whatever } Should work just fine.
  12. Try this: var xmlHttpfunction showUser(str){xmlHttp=GetXmlHttpObject()if (xmlHttp==null){alert ("Browser does not support HTTP Request")return}var url="selectusers.php"xmlHttp.onreadystatechange=stateChangedxmlHttp.open("POST",url,true)xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");xmlHttp.send("q=" + str)}function stateChanged(){if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){document.getElementById("totalusersDIV").innerHTML=xmlHttp.responseText}}function GetXmlHttpObject(){var xmlHttp=null;try{// Firefox, Opera 8.0+, SafarixmlHttp=new XMLHttpRequest();}catch (e){//Internet Explorertry { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }}return xmlHttp;} I believe it should work.
  13. Andrew K.

    File Writing

    Okay, thank you very much for your help.
  14. This may or may not work but you could use AJAX to call the files ( Make sure to store the requests in an array so they have a dynamic name because two requests may not be launched with the same name at once ).When the file is called just use the getResponseHeader("Last-Modified") method of the XMLHttpRequest object and it should give you the required data.For number two, AJAX will most likely not launch the files as it returns the data in a text string.
  15. Andrew K.

    File Writing

    Thank you it worked perfectly.Now all I need to know is how to redirect it to the page referrer.
  16. Andrew K.

    File Writing

    Okay so I've never really used PHP before (I'm more familiar with ColdFusion), but I need to use PHP(My ColdFusion host doesn't support file writing).So I found this code and managed to edit it but something is going wrong. (php.net, I am allowed to use examples from there as codes right?)I am trying to get the file contents and append the query string to the file but it just won't work.Perhaps someone can help me, it doesn't matter how much of this script is changed as long as it does what I want. Also, instead of echoing that stuff, I would like the script just to redirect to the referer. <?php$filename = 'data.txt';$begin= file_get_contents("http://h1.ripway.com/AndrewK/innovate/data.txt",FALSE);$end = "Add this to the file\n //--\\";if (is_writable($filename)) { if (!$handle = fopen($filename, 'a')) { echo "Cannot open file ($filename)"; exit; } if (fwrite($handle, $begin . $QUERY_STRING) === FALSE) { echo "Cannot write to file ($filename)"; exit; } echo "Success, wrote ($somecontent) to file ($filename)"; fclose($handle);} else { echo "The file $filename is not writable";}?> Errors occured: Warning: file_get_contents(): URL file-access is disabled in the server configuration in \\192.168.0.16\webfiles\files\2006-1\616654\innovate\write.php on line 3Warning: file_get_contents(http://h1.ripway.com/AndrewK/innovate/data.txt): failed to open stream: no suitable wrapper could be found in \\192.168.0.16\webfiles\files\2006-1\616654\innovate\write.php on line 3Success, wrote () to file (data.txt)
  17. Unfortunately that doesn't work. I just learned a few hours ago that Coldfusion doesn't support two joins :'(Is there another way I could go about doing this?
  18. Andrew K.

    Two Inner Joins

    How would I go about using two INNER JOINS in a SQL query? I've tried this by going INNER JOIN table2, table 2 ON blah = blah , blah = blah as well as INNER JOIN table2 ON blah = blah INNER JOIN table3 ON blah = blahBut neither work, could someone help me out please?
  19. The 'G' in 'Get' is supposed to be lowercase.And document.style.GetElementById("text").color ="red"; won't do anything.
  20. Andrew K.

    RegExp

    Well using [] you can pass through variables. That's the only reason I've ever used that method.I guess I always just use Object.variable cause I learned that way. It's a thread of IFers
  21. I think he means images with color fading to transparency.
  22. o.0Why not use location.href.split('?var=')[1]?
×
×
  • Create New...