Jump to content

Andrew K.

Members
  • Content Count

    33
  • Joined

  • Last visited

Everything posted by Andrew K.

  1. if you're just matching against a number and a string use isNaN() (is not a number)
  2. I suggest you lose the rounded edges and make the type smaller to start.
  3. I believe you have the problem with your getElementsByTagName('tagname') bit, it's supposed to be getElementsByTagName('tagname')[itemnumber].nodeValue
  4. If the server side coding language you are using supports WDDX use an Ajax Call and bring back the data as JS (if possible) or as XML and parse the XML.EDIT: this is a response to the first question.
  5. Are you both talking about CFAJAX or just regular AJAX? Because I think you're both talking about normal Ajax and I keep reading that it's impossible.
  6. Okay so I've been looking around and I noticed AJAX upload file doesn't exactly exist.Is there an alternative method besides iFrames? Would I be able to use *insert server side language here*AJAX?
  7. Is there a parameter or some script I could write for the Spry ValidationTextField widget to call a function when it has validated?I attempted to add an onblur to the input field that would alert me of the style.display of the textfieldValidMsg field but it always returns blank. :)Any help is much appreciated.
  8. You just need to select the data from each database and use a query of queries to join them.This seemed to work for me when I tested it. <cfquery name="query1" datasource="query1datasource" cachedwithin="#CreateTimeSpan(0,1,0,0)#">SELECT *FROM table1</cfquery><cfquery name="query2" datasource="query2datasource">SELECT *FROM table2</cfquery><cfquery name="joinqueries" dbtype="query">SELECT *FROM query1, query2</cfquery> Of course you'll probably want to play around with it a bit so it returns the right data that you want...
  9. Thanks, with a little modification it worked perfectly. I never thought it would be so easy.So how would I add a month, or a year to a date?I'm guessing I can go plus 30 or whatever but I'm just wondering if there is a function or something for an easier way...
  10. Okay so I'm building this mini event system and I'm listing out all these like events into a page. So I was hoping to bold dates that are closer than a week away.I have this little snippet of code and I was wondering what exactly to write instead of the bolded red text. I don't have much knowledge when it comes to manipulating dates.
  11. className should work just fine.
  12. Hehe, that really lit up my day.
  13. 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.
  14. I completely mis-understood what he wrote, I've been doing that quite alot lately...
  15. Why not just sanitize the input from the server side before putting it in the database?
  16. Try changing document.getElementById('object').style.left="400"; to document.getElementById('object').style.left="400px"; I dunno if it will work, but it should.
  17. I believe document.body.clientHeight and document.body.clientWidth will work.
  18. 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?
  19. myElement.onresize = function() { //Write code here}
  20. 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.
  21. if(document.getElementById('id')) { //do whatever } Should work just fine.
  22. 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.
  23. Andrew K.

    File Writing

    Okay, thank you very much for your help.
  24. 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.
  25. Andrew K.

    File Writing

    Thank you it worked perfectly.Now all I need to know is how to redirect it to the page referrer.
×
×
  • Create New...