Oh sweet! You got it working. NICE!!
Ok, I will check out the link. Thanks.
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.
I'm getting 'text/plain' for everything except the image files. I just added this:
Still get those errors.Code:if TPath.GetExtension(aURL) = '.js' then aMIMEType := 'application/javascript';
Interestingly, if you do this: WebBrowser1.Navigate('file:///' + TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\index.html')), it all works as expected. So the Twebbrowser component can execute the javascript, there is something missing here that we need to do when running it through the protocol handler.
I've been goodling/bing'ing for hours, trying different things.... nothing so far. Sigh.
Is it just me, or is this like the fourth time in the last decade or so this guy has released what amounts to essentially the same engine (GameEngine, PyroGine, Hadron, now Luna) aggressively marketed it for a short while, and then removed all download links from both the forums and his website and just disappeared? Very bizarre......
Bookmarks