VBSCRIPT, A HREF, and JavaScript

Discussion in 'Web Design & Coding' started by madmatt, May 14, 2002.

  1. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    Okay, here's the deal.

    I wrote a VBSCRIPT to save the contents of an TEXTAREA box to a file on my HDD. I call this script using the onClick="setFile('location')" function inside an A HREF statement. The VBSCRIPT works perfectly and saves the input to a file stored on my HDD.

    The problem I am having is that I am trying to prevent MSIE from launching. I tried using href="javascript:void(0)", but the browser still opens with a "the page cannot be displayed" error.

    Here's the A HREF:

    <a onClick="setFile('c:\\windows\\quicknotes.txt')" href="javascript:void(0)">save</a>

    (there are no spaces between JAVA and SCRIPT, the bold print just makes it appear so).

    Any help would be appreciated, thank you in advance.
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    There IS a space (check the HTML code...), I hope you don't have that in your code.
     
  3. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I said, there is not a space. Believe me, there is NOT a space in the actual code. Displaying the code using the forum's BOLD code makes it appear so. Once again, there is NOT a space between JAVA and SCRIPT. Thanks for trying though. =)