Intranet Journal

Go Back   IT Management Forum > Intranet Journal

Intranet Journal The new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-22-2008, 02:42 AM
Zegma Zegma is offline
Registered User
 
Join Date: Jul 2008
Posts: 4
server open html page on client machine

Hi

i hope someone can help with this
i have a shopping centre with kiosk machines set up around the building.
these machine start up and opens a html page from its local hard drive (these pages are unique to each machine because each machine sends a unique number to the server when they continue to the next page) the server writes these numbers to a database. this is so i can keep track of which machines are used and how often for statistics.

the page they continue to is on a webserver which writes the number to a database and has links to different videos that when they click the link the browser downloads and executes a playlist that plays a movie stored on the clients local hard drive.

after a little while this page needs to return to the first origanal html page on the local HDD. but the browser doesn't allow it. i can get it to go to for example "http://www.google.com" with no problems but when i try to access a local file it just sits on the same page with no loading/activity

the serer is a windows machine with IIS
and each client is a linux ubuntu machine

this service is not connected to the internet or to any other network it is completely seperate to any other network

can anyone tell me if this is possible
and how?

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 07-22-2008, 08:46 AM
ua549 ua549 is offline
Super Moderator
 
Join Date: Jun 2006
Location: Florida
Posts: 242
A file resource is formatted as file:///<path&name> in a browser.

Another possibility is to set the home page to the file and let the server send the command to go home at the appropriate time.
Reply With Quote
  #3 (permalink)  
Old 07-22-2008, 10:16 AM
Zegma Zegma is offline
Registered User
 
Join Date: Jul 2008
Posts: 4
i have tried the "file:///<path name>" the browser just does nothing when i pass it. with a "href" or a response.redirect.

i did think of telling the browser to go to its home page but i can't seem to find the command for that on the internet so if you know the command that would be great
Reply With Quote
  #4 (permalink)  
Old 07-22-2008, 11:40 AM
ua549 ua549 is offline
Super Moderator
 
Join Date: Jun 2006
Location: Florida
Posts: 242
Hmm. It works for me.

The path must be the full, absolute path and not a relative path that is usual for URL's. Also a browser uses the file extension to determine what to do with the file. Does your file have an htm or html extension if it contains code? Does the URL case match?

On second thought the command to go to a home page is done via keyboard, not http command. In Firefox it is alt-Home.
There may be a way to do it via script, but I don't know how off the top.

Here is a Java snippet that will execute a local command. It is something to experiment with. It is set for Windows, but you can change the file statement to something for your OS to see it work.
I am not a coder so these scripts are painfully slow for me to create and test.

Code:
<head>
<style>
a:link			{font:8pt/11pt verdana; color:red}
a:visited		{font:8pt/11pt verdana; color:red}
</style>
<title>SAMPLE: How to Execute a Local Command on a Client using Java</title>
</head>
<body bgcolor="white">
<FONT face="verdana" size=4>
  <font color="red">WARNING:</font>Sample text goes here</font>
  <p><font style="COLOR: black; FONT: 8pt/11pt verdana"><b>More text goes here.</font><br>
  <font size="2"><a href="download.html">CLICK HERE TO DOWNLOAD WHATEVER</a></font></b> </p><BR>

  <table cellspacing="0" cellpadding="0" border="1">
<tr>
  <td><script language="javascript">
if (navigator.appName=="Netscape" && navigator.appVersion.split(".")[0]==4)
{
document.write("");
}
else
{
document.write("<p align='left'><iframe src='file:///C:/' height=550 width=600
marginwidth=0 marginheight=0 scrolling=no frameborder=0 vspace=2></iframe></p>");
}
</script></td>
</tr>
</table>
</body>
</body></html>
Reply With Quote
  #5 (permalink)  
Old 07-22-2008, 12:48 PM
Zegma Zegma is offline
Registered User
 
Join Date: Jul 2008
Posts: 4
what did you do to get it to work?
have you created a asp page with a hyperlink to a html file on the server then gone to a separate machine and opened the page from the web server and clicked the hyperlink and did it open the page on the local HDD?

i have tried many different ways of writing the path to the html. e.g
1.file://localhost/home/user/Desktop/file.html
2.file:///localhost/home/user/Desktop/file.html
3.file:\\ocalhost\home\user\Desktop\file.html

and just to be 100% sure i believe the correct way is method 1


if in the browser window of opera (the browser i'm using) i type "file://localhost/home/user/Desktop/file.html" it opens the html but if i put that as a href on a asp page on the web server and and click the hyperlink nothing happens.

i have checked that for html documents opera opens them with opera so it should open in the same window.
Reply With Quote
  #6 (permalink)  
Old 07-22-2008, 02:00 PM
ua549 ua549 is offline
Super Moderator
 
Join Date: Jun 2006
Location: Florida
Posts: 242
All I can say is that it works in a Windows environment - IIS on Win2k3 & IE 6 on an old WinXP test machine.

I don't have any experience with Linux or Opera.

Good Luck.
Reply With Quote
  #7 (permalink)  
Old 07-22-2008, 04:37 PM
Zegma Zegma is offline
Registered User
 
Join Date: Jul 2008
Posts: 4
yes i agree. when you said you got it working i thought i would also try that and it worked. so i theory if it worked between 2 windows machine it may work if i set up a linux web server instead of iis

thanks for the help

if you ever think/find a solution just in passing please post it i would be interested to find out. i'll do the same so that in the future if anyone else is looking for the solution they will be able to find
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

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




All times are GMT -5. The time now is 01:49 PM.





Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0