home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2695
Discussions: 188,384, Posts: 2,243,498, Members: 232,613
Old January 31st, 2003, 12:57 AM   Digg it!   #1 (permalink)
Member
 
nishark's Avatar
 
Join Date: Aug 2002
Location: Downunder
Posts: 432
Resolving network paths

-------
I'm trying to store the full network path of a file in a shared directory network into a database, so that other users using the same database can call up this document from anywhere in the network.

for example
Mapped location on local system: L:\Subdirectory\Disaster.doc
Network location: \\NetworkFileServer\ITDATA\Disaster.doc

I have a form where the user browses the local file system to 'upload'. My aim is to get this location and map it to the corresponding network path location. Then store the network path in the database.

in this case, if a user decides to upload 'Disaster.doc' from his/her L: drive, the network location of the file i.e. "\\NetworkFileServer\ITDATA\Disaster.doc" is stored in the database.

How do I get this corresponding network location?

I'll be using JSP/Javascript, but dont hesitate to present solutions using anything else.
-------

I posted the above in the 'Software Dev' forum. There hasn't been any response. Extensive googling and MSDN-ing and caffeine intaking produced http://www.winguides.com/scripting/r...php?category=3

and then i came up with the following code that did the trick ...


<HTML>
<HEAD>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript">
function displayNetworkShares() {
var WshNetwork = new ActiveXObject("WScript.Network");
var Drives = WshNetwork.EnumNetworkDrives()
var DriveInfo = new Array()
var j = 0

var content = "<h1>Drive Mapping List</h1>"
for (i = 0; i < Drives.length; i++) {
content += "<p>" + Drives.Item(i) + "</p>"
}
document.write(content)
}
</SCRIPT>
</HEAD>

<BODY>
<form>
<input type="Button" name="Button1" value="Give list" onClick="displayNetworkShares()">
</form>
</body>
</html>


sadly, this doesnt work in netscape, and i dont reckon its gonna work in browsers other than IE. please let me know if you notice any apparent errors or problems.

i'd really appreciate if people who have mapped network drives would please cut n paste this code and save it as a '.html' file, open it using IE, and let me know if they got the right mapping list.

also, is there ANYWAY of doing the same thing in Netscape/other browsers?

nishark is offline   Reply With Quote
Old January 31st, 2003, 01:09 AM     #2 (permalink)
Ultimate Member
 
cracked's Avatar
 
Join Date: Nov 2001
Location: Winston-Salem, NC
Posts: 1,440
Send a message via AIM to cracked
sorry, cant help, but u really shouldnt double post, responses or not. im not yelling at you, but just telling you. there wil be a response soon enough, and regardless of what forum its in, it still shows on the top box. one of the two threads will probably be closed unfortunatly, but just giving you warning for the future. good luck resolving your problem

drew
__________________
Visit http://duroo.org

cracked is offline   Reply With Quote
Old January 31st, 2003, 01:25 AM     #3 (permalink)
Member
 
nishark's Avatar
 
Join Date: Aug 2002
Location: Downunder
Posts: 432
well, i know i shouldnt double post.

i just wanted to share my solution to the initial problem. initially it wasnt a 'webmastering' issue, but a 'software dev' one. but once i solved it(and had posted the solution in SW Dev), i figured that it is a webmastering issue now as my solution is web-based.

what i'm trying to say is, it isn't the lack of response in the other forum that led me to post here. i'm more patient than waiting just a day for a response. if u check my 'posting history', u'll albeit notice that there are a few of my queries that have remained unreplied, and i havent double posted. so yes, i do indeed know that i shouldn't double post.

sorry if this annoyed anyone, but i just didnt think i was double posting.

sorry again

regards,
nishark

nishark is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (2896)
The United States Debt (20)
3-days in and no threads about Gaza (160)
I think I just killed my computer w.. (24)
Upgrading RAM (5)
hp compaq nc6000 problems (138)
Folderchat Weekday thread (441)
Antec 300 bulk purchase? (11)
Worth the upgrade?? (15)
Recent Discussions
ACPI controller halt on boot (2)
Building a gaming computer advi.. (3)
Worth the upgrade?? (15)
Folderchat Weekday thread (441)
ADVICE (0)
How to increase my ram? (5)
Help with an Ati Radeon HD 4850.. (27)
CPU wont boot (4)
2nd video card (1)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 09:55 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28