PDA

View Full Version : Need Script to open a local file


imjustabeginner
06-07-2006, 06:48 PM
Hello,

I have a Flash button containing the following code

on (release) {
getURL ("javascript:window.open('c:/documents and settings/me//desktop/start/test.html','testing','width=1024,height=768,left=0 ,top=0,toolbar=No,location=No,scrollbars=No,status =No,resizable=No,fullscreen=Yes')");
}

And it does not work. I am wondering two things, one, why won't it work? And two, I figure I need something in the HTML file itself, but what do I need?

Any help would be greatly appreaciated

Sorry for my n00biness in advance.

Thanks

DT

mcmcom
06-07-2006, 08:08 PM
firstly you should use relative paths so in your javascript: window.open(test.html) instead of the full path. if its in another directory use
../ or ../mydir/myfile.html

you dont need anything else in the html for this to work. Try removing some of the properties and pathing it more abstractly.

hth,
mcm

CyanBlue
06-07-2006, 08:22 PM
Howdy and Welcome... :)

I don't think you can do what you are trying to do to get the file from the user's desktop since you have no way of knowing the full path to it...
Other than that, you should try what mcmcom suggested... ;)

imjustabeginner
06-08-2006, 11:38 AM
I did try what mcmcom suggest, but it just says page cannot be displayed. I have an .htm file in a folder called "Start". I used the following:

on (release) {
getURL ("javascript:window.open('../start/test.htm','testing','width=1024,height=768,left=0 ,top=0,toolbar=No,location=No,scrollbars=No,status =No,resizable=No,fullscreen=Yes')");
}


And it still does not work? Am I still doing something wrong?

Any help would be greatly appreciated

Thanks

Doug