Jump to content

aalbetski

Members
  • Posts

    331
  • Joined

  • Last visited

Everything posted by aalbetski

  1. check out connectionstrings.com
  2. you could capture the onunload event <script> function unloading() { document.getElementById("storage").value = window.location alert() }</script><body onunload="unloading()"> <input type="text" id="storage"></input></body>
  3. I never tested it. It was mocked up to show you 1. How to auto post the page back ( Is it possible to submit the file automatically?)2. How to determine if the page was posted 3. How to set a value when the page was posted back (I need to assign a value to <input type="file" name="oFile1" size="20">. )You cannot set the input type=file to a value. That was told to you by me as well as another user in another forum. I simply showed how to fill a value for an input field (other than the file type)
  4. here is the entire page as I mocked up <%@language=javascript%><%var sFilename = "MyFile"%><body onload="oForm.submit()"><form name="oForm" action="/scripts/cpshost.dll?PUBLISH?<%=Application("PostingAcceptorUploadServerLocation")%>/scripts/charles/addTask.asp" enctype="multipart/form-data" method="post"><% if (Request.ServerVariables("Request_Method") == "POST") { %><input type="text" value="<%=sFilename%>" name="oFile1" size="20" /><% }%><input type="hidden" name="TargetURL" value="<%=Application("FileAttachments")%>/charles/"><p align="center"><input type="submit" value="Upload File"></p></form></body>
  5. I corrected my text (removed the 'GET')The very first time the page loads it will not be a POST, thats' why you use the check. You want to know that the page is posting its data
  6. you can post the page using a onload function<body onload="oForm.submit()">you can tell check if the page is being posted or notif (Request.ServerVariables("Request_Method") == "POST") {}But I don't think you can write to the value of the input type=file. This would work for any other control <%var sFilename = "MyFile"%><% if (Request.ServerVariables("Request_Method") == "POST") { %><input type="text" value="<%=sFilename%>" name="oFile1" size="20" /><% }%>
  7. http://css.maxdesign.com.au/floatutorial/have a look at tutorial #6
  8. aalbetski

    td height

    not sure if this helps, but you could also use rowspan: <table border="1"> <tr><td>Cell</td><td rowspan="2">Cell<td>Cell</td></tr> <tr><td>Cell</td><td>Cell</td></tr> </table>
  9. funny, I ran your version and my version and received the EXACT same results.Granted, there is always more than one way to achieve results, but please do not imply that my solution did not work when it does.
  10. this recursive routine will omit any attributes from the copy <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml"/> <xsl:template match="/"> <xsl:apply-templates select="* | node() "/> </xsl:template> <xsl:template match="* | node()"> <xsl:copy> <xsl:apply-templates select="* | node()"/> </xsl:copy> </xsl:template></xsl:stylesheet> Here is an output fragment <?xml version="1.0"?><standard_area><value>Arts</value><level><value>Alternate</value><standard><value>1-Creating, Performing and Participating in the Arts</value><key_idea_title><value>Movement</value><key_idea><value>happy time harry. </value><performance_indicator><value> create and perform simple dances. </value></performance_indicator><performance_indicator><value> identify and demonstrate movement elements and skills (such as bend, twist, slide, skip, hop, walk in a straight line). </value></performance_indicator><performance_indicator><value> interpret words into a dance. </value></performance_indicator><performance_indicator><value> participate in movement activities. </value></performance_indicator><performance_indicator><value> perform individually or in a group. </value></performance_indicator></key_idea></key_idea_title><key_idea_title> Note, to include the attributes. use this <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml"/> <xsl:template match="/"> <xsl:apply-templates select="* | @* | node() "/> </xsl:template> <xsl:template match="* | @* | node()"> <xsl:copy> <xsl:apply-templates select="* | @* | node()"/> </xsl:copy> </xsl:template></xsl:stylesheet>
  11. I had a similar situation where I needed to check the end of the control name, it was complicated by the fact that using Infragistics controls, they prepend a whole bunch of stuff to the control name as well. Here is one way: function CheckCheckBoxes() { re = new RegExp("^email_") e = new Enumerator(form1.elements) for (;!e.atEnd();e.moveNext()) { x = e.item(); if (x.name.match(re)) { // form element found matching the name "email_" at the beginning } } }
  12. you can use opacity to achieve a similar (though not exact) effect. This will work cross-broswer: <style> img.grayme { opacity:.20; filter: alpha(opacity=20); -moz-opacity: 0.2; }</style><img src="yourimage.jpg" class="grayme" onmouseover="this.className=''"; onmouseout="this.className='grayme'"/> visit here for more tricks:http://www.mandarindesign.com/opacity.html
  13. ASP Pages require an IIS server. After that you can view your pages by "visiting" the site, such as http://localhost/yoursite/yourpage.aspThe following is a complete asp page and will work when served up by an IIS server.<%Response.Write("Hello World!")%>
  14. This looks like it could be done with a windows script host (WSH) file and an instance of an XML parser. As long as the appropriate permissions are in place, this would be a simple solution. I have attached a complete example (you will need to add the appropriate pieces to pass the filenames etc...) // WSH Example writte in javascript// this should be saved with a .js extension WScript //H:CScriptvar xmlFreeThreadDocProgID = "Msxml2.FreeThreadedDOMDocument.4.0";var xmlTmp = new ActiveXObject(xmlFreeThreadDocProgID)xmlTmp.async=falsexmlTmp.setProperty('NewParser', true) var sFileName = "\\\\xx.xxx.xx.xxx\\d$\\xxxxx\\xxxxx\\Data\\xxxx.xml";WScript.Echo(sFileName)if (xmlTmp.load(sFileName) == false) { WScript.Echo("failed to load") WScript.Quit(1);}var oNode = xmlTmp.selectSingleNode("//Codes/C[V='0001']/D");WScript.Echo(oNode.text); I have, of course, xxxed out all references to my remote location and structure
  15. IE is forgiving about dimension while others are not. Your best practice is always append 'px' to your values (or pt or em or whatever your unit is)i.e. document.getElementById("extradiv2").style.top=samalandertop + "px";
  16. You actually do not need to change anything except the regexp operation. Changing to split(",") will fail because you would have changed the split conditions. Based on your original question, you wanted to learn how to use the Split method using the RegExp object. The following is the entire code you need to do this including only the numbers and not the letters (as the first example showed you) var myListString = "apple, 0.99, banana, 0.50, peach, 0.25, orange, 0.75";//var theRegExp = /[^a-z]+/i;var theRegExp = /[^0-9.]+/i;var myFruitArray = myListString.split(theRegExp);document.write(myFruitArray.join("<br>")); produces this result:0.990.500.250.75toggle the comment back and forth between theRegExp lines and you will see how the first excludes any numbers , the second excludes any letters.Changing the split to "," will include ALL elements in the array and this can still be useful if that's what you want. You could then iterate on every other item for the price. You would get this output:apple0.99banana0.50peach0.25orange0.75
  17. change your line to this var theRegExp = /[^0-9.]+/i; this will exclude the numbers and the period from the split
  18. I added single quotes around true, seems to work <html><xml id="Activities"> <XMLDataPersistence> <Duration>30</Duration> <HistoryFields> <Id> <Mandatory>True</Mandatory> <Modifiable>True</Modifiable> <Type>Text</Type> </Id> </HistoryFields> </XMLDataPersistence></xml><script> var oNode = Activities.selectSingleNode("//XMLDataPersistence[Duration=30]") document.write(oNode.xml) document.write("<br>") oNode = Activities.selectSingleNode("//XMLDataPersistence/HistoryFields/Id[Mandatory='True']") document.write(oNode.xml)</script></html>
  19. try this <xsl:output method="html"/> <xsl:template match="*"> <xsl:for-each select="//fact"> <xsl:sort select="slot[name='rank']/value" data-type="number" order="descending"/> <xsl:value-of select="slot"/><br/> </xsl:for-each> </xsl:template></xsl:stylesheet> look closely at this vs yours and you'll see the differences
  20. aalbetski

    New window

    you could add this before your redirectResponse.RedirectLocation = "_blank";of course, this is entirely out of context as to what you are trying to do, but this is how you can redirect to a new location. I didn't check if this was available before .net 2.0
  21. you could get the remote IP adress<%@ language=javascript %><% =Request.ServerVariables("REMOTE_ADDR")%>http://www.w3schools.com/asp/coll_servervariables.asp
  22. aalbetski

    Exclusive Join?

    try using where exists:Select * from Table1 as T1 where exists (Table2 as T2 where T2.id = T1.id)and the reverse:Select * from Table1 as T1 where not exists (Table2 as T2 where T2.id = T1.id)
  23. if you add this doctype to your page, it will render just fine in IE6<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  24. add cellspacing and cellpadding like this<table class="mainTable" cellpadding="0" cellspacing="0">they cannot be set via CSS
  25. You're on the right track, but you can can place your document node-set into a variable that can be accessed later on. A favorite technique of mine. Have a look. This is a complete example using four components1. methodfill.xml (file used to parse against the xslt, has no content, thats your job)2. method.xml (file called by the document function)3. method.xslt 4. method.htm (does the parsing)I'm not sure that I've explained this properly, but take a look at see if this is what you are trying to domethodfill.xml <top/> method.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="http://www.post-n-track.com" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl user" version="1.0"> <xsl:param name="descrFileName">Method.xml</xsl:param> <xsl:template match="*"> <xsl:variable name="methods" select="document($descrFileName)//methods"/> <xsl:apply-templates select="$methods//method[@name = 'steve']"/> </xsl:template> <xsl:template match="method"> <xsl:value-of select="data"/> </xsl:template> </xsl:stylesheet> method.xml <methods> <method name="steve"> <data>Steven</data> </method> <method name="frank" /> <method name="john" /></methods> method.htm <script> var m_xmlSource = new ActiveXObject("Msxml2.DOMDocument.4.0") var m_xslStyle = new ActiveXObject("Msxml2.DOMDocument.4.0") m_xmlSource.async = false m_xslStyle.async = false m_xmlSource.load("methodfill.xml") m_xslStyle.load("method.xsl") m_xslStyle.setProperty("SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'") document.write(m_xmlSource.transformNode(m_xslStyle))</script> result Steven
×
×
  • Create New...