Jump to content


  • Posts

  • Joined

  • Last visited

About packrat

  • Birthday 02/12/1972

Previous Fields

  • Languages
    ASP, VBS, VBA, SQL, ColdFusion, JavaScript, ASP.NET, CSS, ActionScript, XML, XSLT

Profile Information

  • Location
    Chicago Suburbs
  • Interests
    Code, Techno, Scotch Wiskey, Chess, and CounterStrike;<br /><br /><br />Can't fit all my languages in the length alowed; also SqlXml, Xpath, Xquery... probably forgetting something as well.<br /><br />Suppose you could also count alias scripting in CounterStrike as a language if you wanted to. (if HTML counts as a language CS script ought to as well)

packrat's Achievements


Newbie (1/7)



  1. knowing ColdFusion is like being fluent in conversational latin

  2. your later is matching because ( false == false ) == true<xsl:if test=" //foo='.' = //bar='.'"><xsl:if test="false()=false()">these both evaluate to true
  3. one more really dumb question / observation; given the example - those documents shouldn't match because they have different identifiers? <Identifier>22548</Identifier><Identifier>22549</Identifier>
  4. In a pinch you cna d/l a demo of XmlSpy, that will let you step debug xsl transforms, think the newer version of MS Visual Studio does this as well - same thing a demo can help in a pinchI have trouble with the syntax in this line; <xsl:if test="/ssdh:Identifier/text() = '.' = document('output2\out2.xml')/ssdh:Identifier/text() = '.' ">as Martin mentioned the = in the middle looks out of place, I'd expect this to pop.Are you looking to match two identifiers when they are each equal to a literal '.' character?Also the above wouldn't match because its going to look for ssdh:Identifier as the xml document root element; xpath below looks correctthis one seems syntactically correct:<xsl:if test="/InvoiceNotification/DocumentHeader/Identifier = document ('out2.xml')/InvoiceNotification/DocumentHeader/Identifier ">but you say it doesn't work when you add text() to the end of the xpath selectors?
  5. not sure about text() at present, and I haven't had a lot of problems involving namespaces, but if you could elaborate on 'cooperate' a bit I might be able to helppresuming (perhapps incorrectly) that these files have more than a single set of InvoiceNotification, Invoice or InvoiceLineItem you might need to incorporate a for-each, apply-templates or call-template to handle the iteration.../InvoiceNotification/Invoice/InvoiceLineItemimplies:/InvoiceNotification/Invoice[1]/InvoiceLineItem[1]not sure thats any help
  6. One question, what's the schema of the Records table? I'd think that it would have columns for computer, user, and date; I'm failing to understand the indended use of the Users_Computers table. As far as the Users_Computers table goes, if it is purely a cross reference of distinct user:computer relations you might consider a table with only those two columns, unless you need a surrogate primary key (record_id) you might be better off without it; with a x-ref table of 2 columns you can easily make a covering index and satisfy lookups in whichever direction is needed.Need more info to provide a more thoughtout answer though.
  7. try out the examples to see how the syntax works:http://w3schools.com/xml/xml_examples.aspCreate XML Element example // this statement will append your new book node as a child of the selected book node rather than a sibling as intended.x=xmlDoc.getElementsByTagName("book")[0];x.appendChild(newel); if you're wanting to modify the actual file you'll have to use a server side process for that, posting your xml text back to the server to write the file; JavaScript cannot write files.
  8. not sure, but I think he's starting off with a string representation of a time, don't think he was explicit about the source of the data - I at least get the feeling we're not starting off with a date object-- really think he's looking for parseIntAlso, if you want to let us in on a bit more detail as to what you're hoping to accomplish we might be able to give better pointers
  9. think it would be best in the long run to rethink the approach.JavaScript Date Object referenceI'm guessing that you're starting off with a string that represents the time "20:53" and you want to manipulate that as a time not a string.this code is only for illustration purposes, a couple notions. var str='20:53'; // however you get to this point...var ar=str.split(':'); convert time string to array with 2 members [hours, minutes]ar[0]=parseInt(ar[0]); // convert the string type to a number ar[1]=parseInt(ar[1]);var t={hour:ar[0], minute:ar[1]}; // create a object with hour and minute properties// orvar dt=new Date(); // this will be the current system date/timedt.setHours(ar[0], ar[1], 0, 0); // set hour, minute, second, millisecond of the date object dt.getHours() // return the hour 0-23 as a numberdt.getMinutes() // return the minute 0-59 as a number Check out the link above to the JS Date Object refeerence and try some of the 'Try it yourself' examples, can be an easy way to see how the code works and experiment with variations.
  10. packrat

    dropdown menu

    think you might need to post more of your code to get help... maybe the part that defines the background image and some html for starters.
  11. packrat

    IE again.

    as above; tag order is very important, as is doctype declaration. Avoid quirks mode if possible, you loose a lot of CSS and layout gets wonky.Also, IE is quite literal about the white space, if you have any white space between your closing form and div tags you could see a line break down there as form is a block element. Most other browsers will kindly ignore this whitespace even though IE is technically compliant in render it.Those unexpected text nodes can also cause unanticipated script problems if you're not looking out for them.
  12. like a CAPTCHA? squiggly text you have to type in the box? Never heard of that before.Why not search using Bing if that's your preferred searchin engine? I'd think that it would be returning links to W3Schools as well.This happen even when you use the site search on W3Schools site?Expression Web, eh? Think I took a look at that some years back, seemed to be ok at a glance. Did a google search for "google captcha unusual traffic" and do see some discussion of the problem, though I haven't seen a solution yetnot particularly informative...http://www.google.com/support/websearch/bi...py?answer=86640
  13. packrat

    Horizontal Submenu

    the key to preserving your anchor hover style when mousing over the sub nav is to move the :hover selector up to the parent LI element; instead of li a:hover do li:hover > a note IE 6 will not support li:hover or the '>' (child) selector, but I have no sympathy for IE6 users.for IE6 you'll need to step in with a conditional comment and use script.my typical way of handling this is to add a style rule that duplicates the hover pseudo: li.hover, li:hover{} then if I need to use script to make up for a lack of css support its still fairly intuitive.
  14. packrat

    Horizontal Submenu

    here's a revised version of the exmaple using a query string rather than a hash <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css">#Nav{width:600px;border:1px solid #ccc;position:relative;}#Nav ul{list-style:none;padding:0;margin:0;position:relative;width:100%;border:1px dotted #ccc;}#Nav ul ul{position:absolute;visibility:hidden;top:100%;left:0;margin-top:-2pt;padding-top:2pt;}#Nav li{display:inline-block;padding:2pt 1em;border:1px solid #090;}#Nav ul li:hover>ul{visibility:visible !important;}#Nav li.current{background:#090;color:#fff !important;}#Nav li.current > a{color:#fff;}#Nav li.current>ul{visibility:visible;}#Nav:hover li.current>ul{visibility:hidden;} </style><script>var onLoad=function(){ var Nav=document.getElementById('Nav'); for(var x=0, loc=location.search.substring(1),ar=Nav.getElementsByTagName('a'); x<ar.length; x++){ if(loc==ar[x].getAttribute('href').split('?').pop()){ var el=ar[x]; do{ if(el.tagName=='LI'){ el.className+='current'; } el=el.parentNode; }while(el!=Nav); break; } }}if(window.addEventListener)window.addEventListener('load', onLoad, false);else if(window.attachEvent)window.attachEvent('onload', onLoad);</script></head><body><div id="Nav"><ul> <li><a href="?node=1">#node1</a> <ul> <li><a href="?node=1.A">#node1.A</a> <ul> <li><a href="?node=1.A.1">#node1.A.1</a></li> <li><a href="?node=1.B.2">#node1.B.2</a></li> <li><a href="?node=1.C.3">#node1.C.3</a></li> <li><a href="?node=1.D.4">#node1.D.4</a></li> </ul> </li> <li><a href="?node=1.B">#node1.B</a></li> <li><a href="?node=1.C">#node1.C</a></li> <li><a href="?node=1.D">#node1.D</a></li> </ul> </li> <li><a href="?node=2">#node2</a> <ul> <li><a href="?node=2.A">#node2.A</a> <ul> <li><a href="?node=2.A.1">#node2.A.1</a></li> <li><a href="?node=2.B.2">#node2.B.2</a></li> <li><a href="?node=2.C.3">#node2.B.3</a></li> <li><a href="?node=2.D.4">#node2.B.4</a></li> </ul> </li> <li><a href="?node=2.B">#node2.B</a></li> <li><a href="?node=2.C">#node2.C</a></li> <li><a href="?node=2.D">#node2.D</a></li> </ul> </li> <li><a href="?node=3">#node3</a> <ul> <li><a href="?node=3.A">#node3.A</a> <ul> <li><a href="?node=3.A.1">#node3.A.1</a></li> <li><a href="?node=3.B.2">#node3.B.2</a></li> <li><a href="?node=3.C.3">#node3.B.3</a></li> <li><a href="?node=3.D.4">#node3.B.4</a></li> </ul> </li> <li><a href="?node=3.B">#node3.B</a></li> <li><a href="?node=3.C">#node3.C</a></li> <li><a href="?node=3.D">#node3.D</a></li> </ul> </li> <li><a href="?node=4">#node4</a> <ul> <li><a href="?node=4.A">#node4.A</a> <ul> <li><a href="?node=4.A.1">#node4.A.1</a></li> <li><a href="?node=4.B.2">#node4.B.2</a></li> <li><a href="?node=4.C.3">#node4.B.3</a></li> <li><a href="?node=4D.4">#node4.B.4</a></li> </ul> </li> <li><a href="?node=4.B">#node4.B</a></li> <li><a href="?node=4.C">#node4.C</a></li> <li><a href="?node=4.D">#node4.D</a></li> </ul> </li></ul></div></body></html>
  • Create New...