HTML Dialogs- error/how?

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
infomaven
Observer
Observer
Posts: 5
Joined: Tue Jan 15, 2008 5:50 pm

HTML Dialogs- error/how?

Post by infomaven »

Hi all -

I'm a newbie to PWB (librarian with some programming skills). I've checked the forums and read the documentation, but I'm stuck. Please forgive long post - hope this moves this issue along (I'm probably missing something really basic.) - Liz

Here's the deal:
Trying to set up using HTML Dialogs, specifically to use a custom web page for URL denials. I do not want "Yes" or "No" or any buttons on the page. In trying to set this up, I have run into errors/problems and can't seem to get it to work. The scenarios I've seen so far include:

1- With original settings (HTMLDialogs=False, AccessMessageFile=Access.txt), when an invalid URL is accessed, you see the dialog box with its default text, size, and timeout. Works fine, but boring.

2- With HTMLDialogs=True, AccessMessageFile=Access.htm (the original), the dialog works, but it just says "Loading" because that's all that's there in the simple default HTML file. Times out after 10 seconds and closes.

3- With HTMLDialogs=True, AccessMessageFile changed to my HTML file (AccessNotPermitted.htm, placed within PWB folder, just like Access.htm), which contains a simple table and uses a simple CSS file and image, I get the dialog box, but Internet Explorer says "Internet Explorer cannot display the webpage". I've tried to put the URL in the URL.txt file, but that doesn't change anything. The table in the HTML file is a specific size (678). Is this a problem? I've tried to reset the MessageWidth (from blank to 680), but that doesn't work either (still get "cannot display the webpage"). I've also removed the CSS file reference, down to a table and an image, but still doesn't work.

4- With HTMLDialogs=True, AccessMessageFile=Access.htm (default), I try adding my custom file as AccessURLRedirect=(myfile). The first time I try this I forget to remove the AccessMessageFile=Access.htm. So, I get two dialog boxes, one with "Loading...", the other with "Internet Explorer cannot load the webpage". They time out at 10 seconds, but then repeat and refresh. I have to stop PWB in the Task Manager (will not allow override).

5- With HTMLDialogs=True, AccessMessageFile= (blank) and AccessURLRedirect=(myfile), I get a really bad thing: the dialog box does not open, the (maximized) border of the default PWB window starts to flicker (like opening and opening the same page again and again), and I have to stop PWB in the Task Manager.

What's going on? What do I need to do with my HTML files to make this work? I'll be happy to provide copies of INI and other files. Thanks for your thoughts.

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

You need to have at least an Ok button on the page so the patron can dismiss the dialog. Otherwise the patron will need to wait until the timer runs out for the dialog to go away.

Here is the sample dialog that is included with PWB.

Code: Select all

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>This is a sample of the policy H</title>
</head>

<body>

<p>This is a sample of the policy HTML file.</p>

<BUTTON STYLE="WIDTH:100" ID="ButtonOK">OK</BUTTON>
&nbsp;
<BUTTON STYLE="WIDTH:100" ID="ButtonCancel">Cancel</BUTTON>

<p>In order to use the buttons, they must be as follows.</p>
<p>The Ok button must have ID="ButtonOK"<br>
The Cancel button must have ID="ButtonCancel"</p>
<p>See the source of this sample.</p>

</body>

</html>
--Scott

infomaven
Observer
Observer
Posts: 5
Joined: Tue Jan 15, 2008 5:50 pm

yea, but...

Post by infomaven »

OK. But, I don't think this is getting at my question, really.

I don't really want to have either a timeout nor a button. I want the user to get redirected to a pretty HTML/CSS formatted page without OK/Cancel dialog buttons, with the option to Click the X to close the dialog window, or use the Back button. I seem to get so close to this, but then IE says it can't find the file. I've tried moving the file into the PWB folder (so as to eliminate local directory path reading issues, as mentioned in other forum posts), but that doesn't help. See Item #3 in list above.

I've seen this done at another library, however I don't have access to their INI file to compare settings. Furthermore, something I've set or done in the INI is causing a) my very plain HTML file not to display, or b) freezing/crashing PWB. So, I'm more worried that I can't get it to read my HTML page and that I've set PWB to crash. Can you comment regarding those issues? (and I can send the HTML, INIs and directory descriptions). I'll keep trying to use your vanilla HTML to see if it work, but in the meantime --- other thoughts?

infomaven
Observer
Observer
Posts: 5
Joined: Tue Jan 15, 2008 5:50 pm

Some similar issues to old 2003 thread

Post by infomaven »

Scott,

I seem to be in some of the same fix as people in this forum thread from 2003 -
http://teamsoftwaresolutions.com/phpBB2 ... cessdialog

I've seen two dialogs at once, etc. See my points 4 and 5 above. I'm working on Windows XP/IE7 install.

When I noted above that I have two dialogs "one says "Loading..." -- do I need to delete the htmldlg file? I don't want the "Loading..." dialog at all. And, it seems to pop up in addition to the "IE can't open the file", as in two dialogs at once. I guess I just don't get how they relate. If I'm missing something in documentation or another forum post, please point me in the right direction. Thanks for your thoughts.

Scott
Site Admin
Site Admin
Posts: 2539
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

You are talking about 2 completely different things. Using the HTML type dialogs are just that, dialogs that use HTML for their GUI, but they are still dialogs.

If you do not want to use dialogs but you want to redirect to another page you are probably looking for this.

[Files]
AccessURLRedirect=www.yourserver.com/denied.htm

If you do not want the access dialog to show set the following.

[Security]
ShowAccessDialog=False

--Scott

Post Reply