How to give the relative path 
Author Message
 How to give the relative path

Hi all,

I just finished developing the user document based project, in which I had a
web broswer control in the form. What I wanted to do is to direct the
browser to the http://server/docs/filename.html . To do so I the instruction

------------
Webbroswer1.Navigate App.Path & "/docs/" & filename.html
------------

I had created the web installation package and starting to run the program.
Everything is working perfectly but the documents I had put in the web
servers "DOCS" subfolder is not showing. It displays the "Page Cannot be
Displayed" Error. I right clicked and looked at the page properties and
found out that it is trying to display the document from
"C:\WINDOWS\Downloaded Program Files\docs\filename.html". This is not what I
want.

My question is how do I know the server name at run time so that I can
correctly locate the filename at the server (and relative path)?

Any suggestions and guidance most welcome.
Thanks in advance



Sun, 25 Dec 2005 08:25:55 GMT  
 How to give the relative path
Sorry, I may be confusing you. What I mean is

How to determine the server name from which the user document was initiated?


Quote:
> Hi all,

> I just finished developing the user document based project, in which I had
a
> web broswer control in the form. What I wanted to do is to direct the
> browser to the http://server/docs/filename.html . To do so I the
instruction

> ------------
> Webbroswer1.Navigate App.Path & "/docs/" & filename.html
> ------------

> I had created the web installation package and starting to run the
program.
> Everything is working perfectly but the documents I had put in the web
> servers "DOCS" subfolder is not showing. It displays the "Page Cannot be
> Displayed" Error. I right clicked and looked at the page properties and
> found out that it is trying to display the document from
> "C:\WINDOWS\Downloaded Program Files\docs\filename.html". This is not what
I
> want.

> My question is how do I know the server name at run time so that I can
> correctly locate the filename at the server (and relative path)?

> Any suggestions and guidance most welcome.
> Thanks in advance



Mon, 26 Dec 2005 00:28:29 GMT  
 How to give the relative path
I take it this app runs on a local pc using pws(IIS)?

If so just hardcode http://localhost as a prefix or else just use the server
location/address --> http://myserver.com

In which case i assume it is a local app pointing to a remote server

in any case your mistake is with using :
 ------------
 Webbroswer1.Navigate App.Path & "/docs/" & filename.html
 ------------

[App.Path] will take you to wherever the exe is situated/downloaded to,
hence it taking you to downloaded progs folder

try using sumthing like:

------------
assuming that [ svrPrefix = "http://localhost" or "http://myserver.com" ]

Webbrowser1.Navigate svrPrefix & "/docs/" & filename.html

------------


Quote:
> Sorry, I may be confusing you. What I mean is

> How to determine the server name from which the user document was
initiated?



> > Hi all,

> > I just finished developing the user document based project, in which I
had
> a
> > web broswer control in the form. What I wanted to do is to direct the
> > browser to the http://server/docs/filename.html . To do so I the
> instruction

> > ------------
> > Webbroswer1.Navigate App.Path & "/docs/" & filename.html
> > ------------

> > I had created the web installation package and starting to run the
> program.
> > Everything is working perfectly but the documents I had put in the web
> > servers "DOCS" subfolder is not showing. It displays the "Page Cannot be
> > Displayed" Error. I right clicked and looked at the page properties and
> > found out that it is trying to display the document from
> > "C:\WINDOWS\Downloaded Program Files\docs\filename.html". This is not
what
> I
> > want.

> > My question is how do I know the server name at run time so that I can
> > correctly locate the filename at the server (and relative path)?

> > Any suggestions and guidance most welcome.
> > Thanks in advance



Sat, 31 Dec 2005 20:12:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Creating relative directory path given fully-qualified path

2. Parsing an HTML Document - Change Relative paths to fully qualified paths

3. Best method of determining path, relative path and/or flie name

4. convert absolut path to relative path

5. Long Path Names give Runtime error 76 - Path not found

6. Flexible or relative path for import

7. Error trying to set relative path on linked powerpoint presentation

8. I want absolute path in hyperlinks and linked pitures (word makes them relative)

9. Relative Path to Access DB in VB.NET

10. Crystal Reports - relative path in report file name

11. relative path

12. Open Statement Using Relative Path

 

 
Powered by phpBB® Forum Software