Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dkm666

    ajax won't display script tag text in textarea box

    An alternative is to enclose the entire string in a CDATA block, so that the XML parser that receives your AJAX reply will not parse this stuff, but treat it as plain text. I have had to do this when delivering javascript and HTML to be stuffed into a string on the client side rather than being...
  2. dkm666

    Unable to set display attribute of <input>

    Another scheme that I use quite a bit is called CSS switching. In your CSS (either within <style></style> or in a separate file), put .hid {display: none} Then when you want to make the element invisible, do this MyTypeIn.className = "hid" To make it reappear, MyTypeIn.className = ""...
  3. dkm666

    Javscript Problems in FireFox

    ... and just for extra credit, you may find that you get tired of typing all that cruft pretty soon. Here is a little routine that goes into nearly all my pages, just so I don't have to type "document.getElementById() and get all the camel-case stuff right: function idGet(str) { return...
  4. dkm666

    Parsing XML with Javascript

    When I first started using XML as the medium for replies to AJAX queries, I thought I had a real can of worms, too. But a close look at the DOM produced when Firefox parses your XML for you will reveal that every time the XML contains a line-break, the DOM gets a text node (nodeType=3). Unless...
  5. dkm666

    Calculating Dates

    The second thing to check is whether your function getField() is returning a string or a number. The date() constructor will accept either one, but does different things depending on which type its argument is.
  6. dkm666

    Retrieve URL from a frame?

    As I noted above, if you wait for the onload event to fire in the target window, the URL there will reflect the final source of the HTML. You will need some JavaScript in this onload event handler to pass that info back to your "main" window. Oh, BTW, event handlers are noticeably different...
  7. dkm666

    Retrieve URL from a frame?

    In your case, with 2 frames, you ought to be able to get at the properties of each frame considered as a window by using the construct top.frames[1].document.URL. This depends on the "redirector" frame being 2nd in your HTML, but should give the right result. You might need some JavaScript...
  8. dkm666

    Hide/Unhide Table elements

    Rather than setting the style.visibility property on each of your table cells, I would recommend that you consider a technique called "CSS switching". Initially, you declare things to be hidden as "class='hid'", where the CSS contains a line like this: .hid {display:none} Then when you want...
  9. dkm666

    finding frame page load in a frameset

    As dwarfthrower noted, you cannot write JavaScript exclusively within your content frame that will give you the status of the main frame. The way to approach this (assuming you have a way to include JavaScript in the top-level window) is to write some code that is included in the common parent...
  10. dkm666

    Incremental code loading under AJAX

    I worked some more on this tonight, and must sheepishly report that my previous post is in error: if I stop Firebug at a breakpoint, apparently that also halts any javascript activity toward loading scripts, and that seems to be what was producing the results I reported yesterday. I improved my...
  11. dkm666

    Incremental code loading under AJAX

    Yes, I thought about that problem, too. The exact sequence is: 1. XML arrives 2. If it contains a JavaScript library tag, extract the filepath, construct the script element, and start that download. 3. Stuff HTML (containing references to this JavaScript) into target DIV (using...
  12. dkm666

    Javascript issue

    Very subtle reply. I have forgotten closing curly-barckets at least once in my career, and they can be murder to find.
  13. dkm666

    Incremental code loading under AJAX

    Well, I finally got time free to do the experiment you suggested, and I have mixed results to report: creating the script element, assigning a URL to the .src property and attaching the element to the document head DOES cause Firefox to download the indicated script file, and DOES make the...
  14. dkm666

    Incremental code loading under AJAX

    Thanks; this is elegant -- getting the browser to do the work. I'll try it out on all the browsers in my testing stable tonight.
  15. dkm666

    Incremental code loading under AJAX

    I have built several projects now using AJAX to load page fragments instead of whole pages, and am pretty pleased with how this all works. I have come to the point where I wanted to avoid having to load all the JavaScript files for all possible parts of the application upon a first visit by a...

Part and Inventory Search

Back
Top