Please, someone know IF can I resolve the following problem? [I've looked via the search function - but it seems that none had the 'problem'...]
If the URL exists then the HTML gadget opens and shows the .html page.
If you wrote/change the name (ie: index2.html and the file DO NOT EXIST) - the system-InternetExplorer shows an alert ('Page not found, check the name...') and then returns the control to the program.
But I dont' know if I opened (or not) the page...
It will be usefull a return value (true or false) to check the situation.
In this case - IF result=0 go to page 404.html (that exists!)
Thanks!
EDIT:
Nevermind!!! I think I've resolved with HtmlViewStatus
Import MaxGui.Drivers Strict Local window:TGadget Local htmlview:TGadget window=CreateWindow("My Window",30,20,600,440,,15|WINDOW_ACCEPTFILES) htmlview=CreateHTMLView(0,0,ClientWidth(window),ClientHeight(window),window) SetGadgetLayout htmlview,1,1,1,1 Local bmaxdir$ = Getenv_("BMXPATH") Local result:Int = HtmlViewGo(htmlview , bmaxdir + "\docs\html\index.html") 'the file Index.html exists... Print "Exists: "+result While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend
If the URL exists then the HTML gadget opens and shows the .html page.
If you wrote/change the name (ie: index2.html and the file DO NOT EXIST) - the system-InternetExplorer shows an alert ('Page not found, check the name...') and then returns the control to the program.
But I dont' know if I opened (or not) the page...
It will be usefull a return value (true or false) to check the situation.
In this case - IF result=0 go to page 404.html (that exists!)
Thanks!
EDIT:
Nevermind!!! I think I've resolved with HtmlViewStatus