Jump to content

jesh

Members
  • Posts

    2,293
  • Joined

  • Last visited

Everything posted by jesh

  1. Check out these links for more info about using the FileSystemObject:http://www.w3schools.com/asp/asp_ref_filesystem.asphttp://www.tutorial-web.com/asp/fso/http://www.4guysfromrolla.com/webtech/faq/...ject/faq1.shtml
  2. jesh

    Request Query

    It's because of the ampersand (&). Either URL encode the query string or manually convert the ampersand character to %26.http://www.kts.com.sg/?client_name=More%20...0More%20Company
  3. I've been using Paint.NET and have been very happy with it.
  4. The problem is with this line: var theLength = document.getElementById("somePar").length; Try this instead: var theLength = document.getElementById("somePar").innerHTML.length; You were trying to get the length of the paragraph element rather than the length of the text contained inside of it.
  5. Have you looked into using the PagedDataSource class?http://msdn2.microsoft.com/en-gb/library/s...rce(VS.80).aspxhttp://www.sitepoint.com/article/asp-nets-pageddatasource
  6. jesh

    AJAX Problem

    Hmm, I have two suggestions. For your handler (stateChanged()), try this instead: function stateChanged(){ if(xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; } }} Then, in your showCustomer() function, change: xmlHttp.send(null) to xmlHttp.send("");
  7. There's a function in your AJAXRequest.js that checks the content-type of the response: function isViableXML() { return (this.isContentType('text/html') || this.isContentType('text/xhtml') || this.isPureXML() );} This function is returning false because it is looking for "text/html" or "text/xhtml" and it is finding "text/plain; charset=iso-8859-1". That's what is causing your current error (in your processXMLDoc() function).Maybe if you changed the function to: function isViableXML() { return (this.isContentType('text/html') || this.isContentType('text/plain') || this.isContentType('text/xhtml') || this.isPureXML() );}
  8. jesh

    Image Preview

    Oh, I'm not looking for work. I'm saying that I want to build one for myself but I sit at this desk and write code all day and the last thing I want to do is go home and write more code. Maybe when/if things cool down here.If I were to build it, though, rough estimate would be about 30 to 40 hours.
  9. jesh

    AJAX Problem

    So, what happens when you visit the following, do any of them work?../scripts/getcustomer.php?q=24../scripts/getcustomer.php?q=25../scripts/getcustomer.php?q=26Do you have any idea what line IE says line 24 is?
  10. As far as I know, you can't make requests across servers. If your page is at http://www.b3ta.cr3ation.co.uk/data/htm/scratchpad.htm and you are attempting to get at http://localhost/MonkeySite/workerPage.cfm?theAge=41 using AJAX, your code will break.Either host the scratchpad.htm file on your localhost or move your workerPage.cfm to b3ta.cr3ation.co.uk.EDIT: Looking further at http://dkpinteractive.ath.cx/ScratchPad/ScratchPad.htm, the AJAX request is going to http://dkpinteractive.ath.cx/ScratchPad/ScratchPad.php. The version at http://www.b3ta.cr3ation.co.uk/data/htm/scratchpad.htm appears to be attempting to send the request to http://www.b3ta.cr3ation.co.uk/data/js/ScratchPad.php. So cross-browser scripting doesn't appear to be the problem. The problem appears to be that you don't have a file at http://www.b3ta.cr3ation.co.uk/data/js/ScratchPad.php.
  11. jesh

    Image Preview

    No problem. I've been wanting to make a script that does what you are asking so I've done a little research on it. Problem is that I just don't have the time to do it when I'm not getting paid for it! I just found this link. They appear to have a Java library (as well as PHP and others). It might help. Haven't looked too much into it to see if they do filters (sepia, b&w, etc) though.Here's the link: http://imagemagick.org/script/index.php
  12. jesh

    Css Menus

    The only ways that I know how to do this are 1) using server side solution (ASP.NET, PHP, etc) to either include your navigation from another file or write it directly to the page or 2) using javascript to write the HTML directly to your page.If you had a javascript file - let's call it navigation.js - like this: document.write('<a href="page1.html">Page One</a><br />'); Your HTML page could then look like this: <html><head></head><body><!-- Some content goes here --><!-- Navigation goes here --><script type="text/javascript" src="navigation.js"></script><!-- More content goes here --></body></html> The main limitation with this is that a visitor could have javascript disabled in his/her browser which would mean that your navigation wouldn't be included for that visitor. The best bet, if you can do it, is to use a server side solution (ASP, ASP.NET, PHP, etc).
  13. jesh

    image positions

    Yeah, I use it all the time. It's part of the DOM. You can get the left and top positions (offsetLeft, offsetTop) as well as the height and width (offsetHeight, offsetWidth) for any element.Different browsers seem to return different numbers (no suprise there, right?), but they are internally consistent: obj1.offsetLeft - obj2.offsetLeft should return the same value in both Firefox and IE.
  14. jesh

    Listing Tables Question

    I believe the command to list all of the tables in MySQL is: SHOW TABLES;So your query could be something like: mysql_query("SHOW TABLES;");
  15. So, you have a list of words (one word per line?) and 26 directories which may contain multiple files and you need to check the filenames for these files to verify that they do NOT contain words from your wordlist? Is this correct?If so, you'll be using the FileSystemObject. First step would be to use the FileSystemObject to open your txt file, read the contents one line at a time, and store the words in something like a Dictionary object.Then you'll want to use the FileSystemObject to find all of the directories (your cam_a, cam_b, etc) in a particular directory and then loop through all of those directories to get a list of all the files in each directory. You'll then need to loop through the files to get each individual file name. Finally, you'll have to loop through each word in your Dictionary and use some type of matching (e.g. regular expressions) to see if the filename contains your word.Sorry I don't have any code for you, I haven't used VBScript in a long time.
  16. jesh

    File Import

    I once worked in Inventory Control for a retailer and one of my tasks was to import data into Excel to build reports for the sales staff. This got to be incredibly tedious so I decided to learn about programming - specifically automation.The way I got started was that I would use the Record Macro tool in Excel and record the steps that I took to import (and format) the data. When I was done, I'd stop the macro and edit its code to see if I could glean any information from it. Eventually I was able to tweak the code and have it do different things.I hope this helps!A Google search may provide some help too.
  17. jesh

    image positions

    I use offsetLeft and offsetTop quite often. var img = document.getElementById("MyPic");var left = img.offsetLeft;var top = img.offsetTop;
  18. jesh

    Image Preview

    I haven't seen any Java applets (I haven't looked...), but I've come across some .NET articles that describe this. Perhaps it'll help.http://msdn.microsoft.com/msdnmag/issues/0...rs/default.aspxhttp://www.codeproject.com/vb/net/colormatrix.asp
  19. After looking into this a little more, it appears that it is just a shorthand for object declaration.For example, this: var MyRectangle = { X:0, Y:0, Width:100, Height:50 } is the same as this: var MyRectangle = new Object();MyRectangle.X = 0;MyRectangle.Y = 0;MyRectangle.Width = 100;MyRectangle.Height = 50;
  20. I haven't looked into this much, but I remember seeing it in the TinyMCE code. It appears to be another way to set up classes/objects.Check out this link: http://www.digital-web.com/articles/objectifying_javascript/
  21. jesh

    Image onLoad

    I don't think I'm missing your point. What I am missing is an understanding of why this is such a big deal for you. I understand that it adds an additional challenge when learning a new technology, but that's just part of learning it. Javascript is the way it is and we all have to accept that. If someone wants to write his/her own scripting language that conforms with a standard then s/he can have at it. Like I said earlier, these idiosyncracies are everywhere - the HTTP standard even has one with "referer" (should be referrer).
  22. Yes, typically if a line of your code breaks, the rest of the script will cease to run.
  23. jesh

    CSS Clip

    Hmm, I guess I found the answer. You have to specify a z-index as well.This code clips the image: <html><head><style type="text/css">#Clipper{ width: 50px; height: 50px; clip: rect(10px, 40px, 40px, 0px); position: absolute; z-index: 3;}</style></head><body><div id="Clipper"><img src="http://www.w3schools.com/images/w3default80.jpg" width="234" height="91" /></div></body></html>
×
×
  • Create New...