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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by aforstie

  1. aforstie

    onclick event handler cancel onmouseover evenhandler?

    Anyone know if an onclick event handler can cancel an onmouseover event handler and bring the user to the href? < a href="http://tek-tips.com" onmouseover="dosomething" onclick="cancel dosomething and bring the user to tek-tips">link</a> What I want is an informational ajax window to...
  2. aforstie

    Use perl to write XML from a flat file

    I have a script that works and is writing the XML file as expected. Now I would like to add an enhancement that would eliminate duplicate <location> elements in the XML file. For example if I have two items in Phoeninx, AZ in the flat file, I would write only one <locaction> element, I need to...
  3. aforstie

    Use perl to write XML from a flat file

    I am wondering if perl can be used to write an xml file from a pipe-delimited file. I want to take something in a file that might look like: ID|Name|City|State|Country And try to write XML that might look like: <item-list> <item> <location city="City" state="State" country="Country"/>...
  4. aforstie

    Write XML from delimited file

    Interesting. That is exactly what I was looking for and it worked great. Thanks for your help.
  5. aforstie

    Write XML from delimited file

    I have a multi-line pipe delimited file that I want to use to write an XML document. I was hoping to use a shell script to do this. Does anyone have any examples or advice they are willing to share. Here is what the pipe delimited file would look like: Name1|PHX|AZ| . . . Name5|MSP|MN Here is...
  6. aforstie

    Safari Question

    I am not using any kind of Javascript framework.
  7. aforstie

    Safari Question

    I do not have a URL in production that you can look at yet. I have changed the code a little to address some other issues and it now reads: function textElement() { var inputElement = document.createElement("input"); inputElement.setAttribute("name","password")...
  8. aforstie

    Safari Question

    Thanks for the tip! This still works in all cases - but it still shuts down the Safari browser :(
  9. aforstie

    Safari and removeChild

    I switched it to this and I am getting the same results. Any other ideas? // removeElement(document.getElementById("password")); function removeElement(obj) { obj.parentNode.removeChild(obj) }
  10. aforstie

    Safari Question

    Please see the javascript below. In Safari if I tab into the field that calls this function the browser shuts down. If I click in the field everything works but the focus is not set. Any ideas how I may fix this? Or as a worst case at lease put in a fix to prevent the (Safari) browser from...
  11. aforstie

    setAttribute vs getElementById

    Below works -- thanks for the help! if (window.attachEvent) { document.getElementById("password").attachEvent("onfocus",passwordElement); } else if (window.addEventListener) { document.getElementById("password").addEventListener("focus",passwordElement,true); }
  12. aforstie

    Safari and removeChild

    I call the following function and it appears to remove it from the DOM in Safari. The field it is removing is a password field that has a value of "Password". I add a new node to the DOM that has no value, but when I input a value Safari sends in the the first value "Password" and the value I...
  13. aforstie

    setAttribute vs getElementById

    Below is what I now have after reading the replies to this post and looking at other sources. if (document.getElementById("password").attachEvent) { document.getElementById("password").attachEvent("onFocus",passwordElement); alert ("foo - ie - password"); } else if...
  14. aforstie

    setAttribute vs getElementById

    When I am using javascript to add a node to the DOM, I am going to need to set the onFocus attribute that will call another javascript function. As you can see below most of the attributes are set using setAttribute, but there are a couple where I needed to use getElementById to work in IE. As...
  15. aforstie

    onclick event to submit a form

    This works for the most part, but I have two more questions. [1] If I am trying to submit a form when I am not within the form, but it is on the page, how would I do that? [2] Why would you use return false in place on event.cancelBubble=true? thanks!

Part and Inventory Search

Back
Top