Mozilla Htm Code to open Mozilla as a kiosk

Gents

I am no expert in htm but i have found some code with which I can restrict mozila to be a kiosk style web browser

The only think is that when i run the code it opens up 2 windows

the first window is blank
the second opens up my kiosk style browser

I will paste the code into this page

But i am after someone to modify this so that when i execute this it only open up the kiosk style web page


<html>
<head>
<script language="javascript">
<!--
function WinOpen(){
window.open("http://htsvr1:82","","toolbar=yes,scrollbars=yes");
timeoutID=setTimeout("WinClose()", 1000);
}
function WinClose(){
window.close();
}
//-->
</script>
</head>
<body onLoad="WinOpen()">
</body>
</html>


Any ideas

Darren
 
DarrenJacksonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

superm401Commented:
Easy answer:

It can't be done.

Hard answer:

It can if you have a signed script.  See http://www.mozilla.org/projects/security/components/jssec.html#sameorigin

The way you have it now, it will never close the window.  This is because Mozilla doesn't close windows that you didn't use a script to open.  I recommend you just let it be, and remind the user to close the original window.
0
DarrenJacksonAuthor Commented:
I am able to close the window behind the one i want.

So would it be possible to have a piece of code to do this without having someone close it manually.

It needs to be closed so that a user cannot browse past the windows he is allowed to view

Darren
0
superm401Commented:
Okay, you have two pages.  One opens the kiosk window(let that be page A), and the other is the kiosk window(page B).  If you make another one that opens page A using window.open(), everything will work.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

DarrenJacksonAuthor Commented:
OKay

What  code do I use to close the other pages

Darren
0
cristy56Commented:
add this statement to your page A so that it will close automatically,
<BODY  LEFTMARGIN="0" TOPMARGIN="0" onLoad="setTimeout(window.close, 5000)">
you can modify the parameter 5000 to any number, the unit is in ms.

Cristy
0
superm401Commented:
Yeah, or your existing functions will work, provided you use javascript to open page A.
0
DarrenJacksonAuthor Commented:
I have a piece of vb code that opens up a web page but it opens up internet explorer

How would I be able to open up mozilla using the same piece of code

Private Sub Label2_Click()
 Terms.Show vbModal, Me

End Sub




Private Sub Form_Load()
    WebBrowser1.Navigate "http://htsvr1:82/index.php"


Above code is opening explorer instead of mozilla

Any Ideas

Darren
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pmsyyzCommented:
cwkhang, he doesn't want to run Mozilla in kiosk mode, he just wants to open a browser window with minimal user interface.

cristy56, JavaScript cannot close a window that was not opened by JavaScript.

DarrenJackson, I would recommend just using a regular window.open() with the width and height set to the screen dimensions and all the various UI options (menubar, location, status, etc.) set to no.  You can't close the browser window that it is launched from.
0
DarrenJacksonAuthor Commented:
Gents

Thankyou all for helping me out but cwkhang was thier with the answer

Thank you

Darren
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.