Here's another interesting programming trick I discovered at work recently that I was unable to find a solution to anywhere on the Internet:
Everyone knows that what makes the Internet the Internet is that everything is interconnected through links. Typically, these links connect to webpages with Internet-friendly file extensions, like ".htm" or ".html". One of these links would look like this: http://www.raisingcharlie.com/index.htm. But it is also possible to link to files that are not typically found on the Internet, like Microsoft Word (.doc) and Microsoft Excel (.xls) documents. This is done in the same way: http://www.raisingcharlie.com/docs/press_release.doc. The difference is that this link will bring up a dialog box asking if the user wants to Open or Save the document. Choosing to open the document will open a read-only version of the document. Choosing to save the document will open a Save As dialog, with the usual options for filename and location.
But what if the document in question is a collaborative one that the programmer wishes users to be able to update directly? How does he get around the read-only restriction of a standard link? The answer is to use a Universal Naming Convention (UNC) path instead of a Uniform Resource Locator (URL) path in the link. In HTML, a link of this type would look something like this:
Note the backslashes and the use of the entire path to the file, starting with the server name or IP address. The only other trick to making this link work is that the "docs" directory must be set up with public "write" rights, so the programmer would want to be careful about what files were shared in this way.
If you share my line of work, give this a try and see for yourself how well it works. Good luck!
This blog is an account of the pursuit of a dream, to sail around the world. It is named after the sailboat that will fulfill that dream one day, Whispering Jesse. If you share the dream, please join me and we'll take the journey together.
For Charlie and Scout
For Charlie and Scout
About Me
- John Lichty
- Savannah,
Georgia, USA
"Go confidently in the direction of your dreams. Live the life you have imagined." --Henry David Thoreau
Raising Charlie: The Lessons of a Perfect Dog by John Lichty
Blog Archive
Followers
Recommended Links
- ATN Sailing Equipment
- ActiveCaptain
- BoatU.S.
- Coconut Grove Sailing Club
- Doyle Sails - Fort Lauderdale
- El Milagro Marina
- John Kretschmer Sailing
- John Vigor's Blog
- Leap Notes
- Noonsite.com
- Notes From Paradise
- Pam Wall, Cruising Consultant
- Practical Sailor
- Project Bluesphere
- Sail Makai
- So Many Beaches
- Windfinder
Saturday, November 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment