Ok, I got it reading from the zip file. Seem to work ok. The one problem i'm seeing is that I can not get the index items to collapse. Not sure what's going there, but everything else seems to be working.
Inkedhelpviewer_LI.jpg
Ok, I got it reading from the zip file. Seem to work ok. The one problem i'm seeing is that I can not get the index items to collapse. Not sure what's going there, but everything else seems to be working.
Inkedhelpviewer_LI.jpg
I'm not sure but not being able to collapse index tree might be due the fact that by default pages that are being displayed in TWebBrowser component or whenever any third part program is using IWebBrowser interface are being opened in backward compatibility mode. In order to avoid that your program must be registered as a Web Browser. See the link bellow for more information
https://stackoverflow.com/a/25843958
Any way with the help of your posted code I can now display and navigate Platform eXtended documentation properly as it consists of just bunch of self contained HTML files (no use of frames). So I don't even need the code in OnNewWindow3 event.
Oh sweet! You got it working. NICE!!
Ok, I will check out the link. Thanks.
Oh oh! To use the frames, you simple have to do this:
Just specify the frame name and it will "just work" without all the extra loading I was doing before.Code:procedure TForm2.WebBrowser1NewWindow3(ASender: TObject; var ppDisp: IDispatch; var Cancel: WordBool; dwFlags: Cardinal; const bstrUrlContext, bstrUrl: WideString); var s: string; begin // cancel new window operation Cancel := True; WebBrowser1.Navigate(bstrURL, '', 'hmcontent'); end;
Code:begin // remove any slashes from the front while (aURL <> '') and (aURL[1] = '/') do Delete(aURL, 1, 1); // remove any slashes from the back while (aURL <> '') and (aURL[Length(aURL)] = '/') do Delete(aURL, Length(aURL), 1); // check for index.html/ if aURL.Contains('index.html/') then begin // remove from url aURL := aURL.Replace('index.html/', ''); end; // if empty its the room else endpoint is a file if aURL.IsEmpty then aURL := 'index.html'; // get mime type of file aMIMEType := FindMimeType(aURL); // load the file WriteOutFile(GenFilename(aURL)); end;
Now, on to javascript issues. Oh, I tried the emulation and some other stuff, not working so far. Grrrr!
Could you provide sample of your help webpages you use. After searching my computer I have no webpages which would be utilizing Frames, so I can't see and diagnose problems you are facing. Therefore I can't actually help but only speculate of what might be wrong.
Hi, yea sure. Thanks. This link!
Just tested your help and it seems that there is a problem in FindMimeType function becouse it always returns empty string when it is checking Mime Type of Java Scripts (.js files). Consequently no Java Scripts are loaded properly. I guess.
Bookmarks