Lucky you Jorge, if here in Genoa, today not there had been a whirlwind (no electricity and discarge notebook :-( ) I (too) would have answered so: '------------------------------ Public Sub Form_Open()
WebView1.HTML = MakeHtml() End Private Function MakeHtml() As String Dim sHtml As String sHtml = "<!DOCTYPE html>" & "\n" sHtml &= "<html>" & "\n" sHtml &= "<body>" & "\n" sHtml &= "<a id=\"myAnchor\" href=\"http://gambaswiki.org/wiki\" onclick=\"myFunction(event)\">Documentation</a>" & "\n" sHtml &= "<script>" & "\n" sHtml &= "function myFunction(event) {" & "\n" sHtml &= "event.preventDefault();" & "\n" sHtml &= "document.getElementById(\"myAnchor\").innerHTML = \"Canceled\";" & "\n" sHtml &= "}" & "\n" sHtml &= "</script>" & "\n" sHtml &= "</body>" & "\n" sHtml &= "</html>" & "\n" Return sHtml End Public Sub Form_Close() Print WebView1.HTML End '-------------------------------------- It is no good code, but I had come this way. As I'm starting to study WebView I wanted to ask you, this is how it should be implemented the script. Otherwise? Can you give me any suggestions? Regards Gianluigi 2016-10-14 17:25 GMT+02:00 Jorge Carrión <sho...@gmail.com>: > Well... I think that I've found a workaround only with gambas. (It's a > little tricky but it works), > > Thank you for the answers. > > Best Regards > > 2016-10-14 15:03 GMT+02:00 Moviga Technologies <mov...@mykolab.ch>: > > > There might be a way to do it with Gambas, but you can use javascript's > > preventDefault() > > > > http://www.w3schools.com/jsref/event_preventdefault.asp > > > > > > Den 14. okt. 2016 12:15, skrev Jorge Carrión: > > > I'm trying to do a control like textEdit, but allowing with links and > > > images, based on webBrowser example. > > > > > > All is done and works fine, but if I create a link (<a href.. etc) and > I > > > click on it the webview, naturally, follows the link and I loose all > the > > > changes on the page. > > > > > > I want prevent that behaviour in the way that if user clik on a link > and > > > the editable property is true, the webview doesn't follow the link. > > > > > > Hope this will be more clear. > > > > > > Best Regards > > > > > > 2016-10-14 11:39 GMT+02:00 Gianluigi <bagone...@gmail.com>: > > > > > >> Hello Jorge, > > >> I do not understand the question, could you be more specific? > > >> Thank you > > >> Gianluigi > > >> > > >> 2016-10-13 18:29 GMT+02:00 Jorge Carrión <sho...@gmail.com>: > > >> > > >>> Is there a way to stop the follow of links in webview when webview is > > in > > >>> "edit mode" (editable=true)? > > >>> > > >>> Best Regards > > >>> ------------------------------------------------------------ > > >>> ------------------ > > >>> Check out the vibrant tech community on one of the world's most > > >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > >>> _______________________________________________ > > >>> Gambas-user mailing list > > >>> Gambas-user@lists.sourceforge.net > > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > > >>> > > >> ------------------------------------------------------------ > > >> ------------------ > > >> Check out the vibrant tech community on one of the world's most > > >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > >> _______________________________________________ > > >> Gambas-user mailing list > > >> Gambas-user@lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > >> > > > ------------------------------------------------------------ > > ------------------ > > > Check out the vibrant tech community on one of the world's most > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------ > > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user