Hi,
1. Is there a way to distinguish PWB from MSIE when using navigatior.appName or navigator.userAgent or similar properties as PWB returns exactly same results as MSIE ?
2. Is it possible to dynamically remove the tool bars, status bar etc using javascript ?
3. Is it possible to dynamically modify configuration file from a webpage ?
A few questions
Moderators: Tyler, Scott, PWB v2 Moderator
1. PWB uses the IE Web Browser Control to do all the HTML rendering, it is the control that is reporting itself as IE. There is no way to distinguish the two.
2. Using PWB v2.05 it is possible to use the external java commands to dynamically hide the toolbar. To hide the toolbar use the JavaHideToolbar=PWBHideToolbar java command. Please see the following page for examples of the external java command.
http://www.teamsoftwaresolutions.com/beta/external.htm
We can add more external java commands to meet your needs, please email Support@TeamsoftwareSolutions.com for more details.
PWB also responds to the JavaScript window.open with no toolbar or status bar.
3. PWB can only modify a few of the settings through the external java commands, but we could certainly add more. You could also use the external java commands to open Notepad with the INI showing.
--Scott
2. Using PWB v2.05 it is possible to use the external java commands to dynamically hide the toolbar. To hide the toolbar use the JavaHideToolbar=PWBHideToolbar java command. Please see the following page for examples of the external java command.
http://www.teamsoftwaresolutions.com/beta/external.htm
We can add more external java commands to meet your needs, please email Support@TeamsoftwareSolutions.com for more details.
PWB also responds to the JavaScript window.open with no toolbar or status bar.
3. PWB can only modify a few of the settings through the external java commands, but we could certainly add more. You could also use the external java commands to open Notepad with the INI showing.
--Scott
If you have access to the local machine there are several places you could verify if PWB was running. For example, when PWB runs it sets the Application Handle as a DWORD value in the following registry location.
HKEY_CURRENT_USER
Software\\TeamSoftware Solutions\\Public Web Browser v2\App_Handle
You could also check for the PWB.EXE process.
--Scott
HKEY_CURRENT_USER
Software\\TeamSoftware Solutions\\Public Web Browser v2\App_Handle
You could also check for the PWB.EXE process.
--Scott
scott,
Thanks for reply. Few points I forgot to mention explicitly:
1. I need to do it in javascript. I don't think the measures you suggested are possible in JS. I may be wrong.
2. If both IE and PWB are running then I would need to know that the process I am in is actually PWB and not IE.
Thanks in advance
Thanks for reply. Few points I forgot to mention explicitly:
1. I need to do it in javascript. I don't think the measures you suggested are possible in JS. I may be wrong.
2. If both IE and PWB are running then I would need to know that the process I am in is actually PWB and not IE.
Thanks in advance
I couldn't get the external command example page working. Whenever I click on the button I get error messages object doesn't support this property or method. For dummy and exit link nothing happens.
Can you please post a working example if possible.
When I do window.external.JavaHideToolbar=PWBHideToolbar as you suggested I get PWBHideToolbar is undefined.
function OnClickDummy()
{
window.external.JavaHideToolbar=PWBHideToolbar;
//window.external.PWBDummy
}
I have version 2.05 of PWB.
Am I doing something wrong ?
Thanks
Can you please post a working example if possible.
When I do window.external.JavaHideToolbar=PWBHideToolbar as you suggested I get PWBHideToolbar is undefined.
function OnClickDummy()
{
window.external.JavaHideToolbar=PWBHideToolbar;
//window.external.PWBDummy
}
I have version 2.05 of PWB.
Am I doing something wrong ?
Thanks
In the [Java] section of the PWB INI you should have the following set.
[Java]
...
JavaHideToolbar=PWBHideToolbar
...
Then the Java command as follows should work.
window.external.PWBHideToolbar
The java commands are dynamic and must match what is specified in the PWB INI file.
On the sample page, the dummy command is there just to show it does not effect PWB.
http://www.teamsoftwaresolutions.com/beta/external.htm
This sample page works with the following dynamic external java command set.
[Java]
JavaExit=PWBExit
JavaActivity=PWBActivity
JavaRegister=PWBRegister
JavaHideToolbar=PWBHideToolbar
JavaExecute=PWBExecute
JavaReadINIFile=PWBReadINI
--Scott
[Java]
...
JavaHideToolbar=PWBHideToolbar
...
Then the Java command as follows should work.
window.external.PWBHideToolbar
The java commands are dynamic and must match what is specified in the PWB INI file.
On the sample page, the dummy command is there just to show it does not effect PWB.
http://www.teamsoftwaresolutions.com/beta/external.htm
This sample page works with the following dynamic external java command set.
[Java]
JavaExit=PWBExit
JavaActivity=PWBActivity
JavaRegister=PWBRegister
JavaHideToolbar=PWBHideToolbar
JavaExecute=PWBExecute
JavaReadINIFile=PWBReadINI
--Scott
Ok. figured out what the problem is. We need a () to call the method.
so following gives the memory exception
window.external.PWBExit
while
window.external.PWBExit() works.
Now the question is how do I make it work accross the users? Say for example user 1 has following setting :
JavaHideToolbar=MyHideToolbar
and user 2 has following
JavaHideToolbar=PWBHideToolbar
calling function with window.external.PWBHideToolbar() will give error for user 1.
Is there a way to get what a user has set in there and then call it dynamically ?
so following gives the memory exception
window.external.PWBExit
while
window.external.PWBExit() works.
Now the question is how do I make it work accross the users? Say for example user 1 has following setting :
JavaHideToolbar=MyHideToolbar
and user 2 has following
JavaHideToolbar=PWBHideToolbar
calling function with window.external.PWBHideToolbar() will give error for user 1.
Is there a way to get what a user has set in there and then call it dynamically ?