JScript to extract attachment file name? - InfoPath Dev
in

InfoPath Dev

JScript to extract attachment file name?

Last post 04-10-2006 02:06 PM by anotherchrisberry. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-10-2006 01:17 PM

    JScript to extract attachment file name?

    I've been searching and experimenting with code for nine hours now, and can't come up with anything helpful on this question:

    Does anyone have JScript code to extract the file name from an attached file? I've tried re-writing the VBScript implementation (found here:http://www.motobit.com/tips/detpg_Base64/) but failed; I also don't have Visual Studio.

    It seems silly to need just the filename, but the name will be used to construct hyperlinks with XSLT, and I can just imagine the complaints from users if they have to enter the file name manually ("But I can see it right there on the screen. Why do I have to type it in, too?").

    Anybody have a good Base64 decoder written in JScript? I haven't been able to find one.

    Thanks!
  • 04-10-2006 01:58 PM In reply to

    Re: JScript to extract attachment file name?

    anotherchrisberry,

    Did you try this VBscript method?

    http://www.webmasterworld.com/forum47/414.htm

    Hope that helps
  • 04-10-2006 02:06 PM In reply to

    Re: JScript to extract attachment file name?

    That would not work because Infopath automatically encodes the file (and includes the file name in a header) when the user attaches it. So there's no point at which you can grab the file name (or path) that I can see.

    The only (?) solution I can think of is to decode the header generated by Infopath, but it needs to be done by JScript.

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.