I have this code which is suppose to fetch a url in an htmlviewer on a window to another htmlviewer on another window which works as a popup browser, but it doesnt seem to work. it rather opens the popup browser as a blank page and it then opens the xojo file location on my computer. Can any one help me?
dim url As String
dim pop As new popupwindow
pop.Title = “Secured Guest Logging”
pop.Width = 500
pop.Height = 700
ShowURL(url)
Return pop.popupviewer
You get the clicked URL in the CancelLoad event. In the URL property. If you return True, the HTMLViewer won’t go to that URL and you can open it elsewhere.
[code]Function CancelLoad(URL as String) As Boolean
dim pop As new popupwindow(URL)
pop.Title = “Secured Guest Logging”
pop.Width = 500
pop.Height = 700
@Michel Bujardet okay, i get it. But the problem i am facing now is that the CancelLoad event fires immediately my application opens. I want it to fire when an html link with _blank is clicked. so I will get its link and open it in a popup browser.
@Giulio Mastrosanti … Thanks Guilio, I have this code in my NewWindow event which opens the new window as a popup, my problem i am having is how do i get the link clicked to appear in the htmlviewer in that new window. This is the code in the NewWindow event.
dim pop As new popupwindow
pop.Title = "Secured Guest Logging"
pop.Width = 500
pop.Height = 700
pop.popupviewer.LoadURL()
Return pop.popupviewer
i am so confused now, help me guys. pleaaaase. How do i get the clicked link into LoadURL, “popupviewer is the name of the htmlviewer”
@Giulio Mastrosanti … Dont know what the problem is, but i just tried your method and it just loads an empty page displaying nothing. It seems it cannot get the url been clicked