Everything posted by LaxLoafer
Content-disposition. It's an HTTP header that allows you to specify how a resource should be downloaded, in-line or as an attachement.You can set the header using server-side scripting, or perhaps by your web server's configuration. Which web server are you using?All popular web browsers are aware of the header, but whether they follow your instructions might depend on things like user preferences and which plug-ins are available. I'm unsure how email clients behave so you may need to do some testing.As a programming task, it's fairly trivial to implement. Why not hire a coder to do it for you? Or have a crack at it yourself and post your code back here if you get stuck. You may even find there's some code on the Internet you can cut'n paste and adapt to your needs.
Correction: string.replace(/s*/,""); Inserted missing backslash.
The 'g' in your example is a modifier. It causes the regex to match all occurrences of a pattern. In this instance, every new line character and any preceding whitespace will get replaced by nothing, throughout the entire string. Remove the 'g' and it will match the first occurrence only. You may also want to remove the 'n' because 's' matches all whitespace, including new lines. So, your regex might need to look simply like... string.replace(/s*/,""); Does this work for you?