F FJS Active Member Licensed User Longtime User Jun 20, 2015 #1 Hello everybody, I am trying to use the following html code: <script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script> As you can see, the idea is showing ads, and in this case, the ads networking (leadbolt in fact), told me that is necessary to use a webview. I tried it, with a webview like this: WebView1.LoadHtml("<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>") however it has a syntax error... and only the text apears in my screan Please, any expert could you tell me how white right the information? Thank you!
Hello everybody, I am trying to use the following html code: <script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script> As you can see, the idea is showing ads, and in this case, the ads networking (leadbolt in fact), told me that is necessary to use a webview. I tried it, with a webview like this: WebView1.LoadHtml("<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>") however it has a syntax error... and only the text apears in my screan Please, any expert could you tell me how white right the information? Thank you!
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2015 #2 Change your code to: Code: Copy WebView1.LoadHtml($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$) Upvote 0
Change your code to: Code: Copy WebView1.LoadHtml($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$)
F FJS Active Member Licensed User Longtime User Jun 20, 2015 #3 you are a great, thank you By the way, how is possible to change further characteristic of webview?, the image is not in the centre of the rectangule, and the background is white and I need to have it transparent.. Thank you again Best regards Upvote 0
you are a great, thank you By the way, how is possible to change further characteristic of webview?, the image is not in the centre of the rectangule, and the background is white and I need to have it transparent.. Thank you again Best regards
warwound Expert Licensed User Longtime User Jun 21, 2015 #4 FJS said: By the way, how is possible to change further characteristic of webview?, the image is not in the centre of the rectangule, and the background is white and I need to have it transparent.. Click to expand... Learn a bit of basic HTML: https://www.google.co.uk/search?q=html+tutorial&ie=UTF-8&oe=UTF-8&gws_rd=ssl Upvote 0
FJS said: By the way, how is possible to change further characteristic of webview?, the image is not in the centre of the rectangule, and the background is white and I need to have it transparent.. Click to expand... Learn a bit of basic HTML: https://www.google.co.uk/search?q=html+tutorial&ie=UTF-8&oe=UTF-8&gws_rd=ssl
F FJS Active Member Licensed User Longtime User Jun 21, 2015 #5 Thank you for recommendation However there is another problem, now the ad image is showed perfectly with the Erel's recommendation, but if you press on the ad, a message appears: "webpage not available", so I suppose it is not right yet. Would you know the root case? and how to solve it? Thanks again Upvote 0
Thank you for recommendation However there is another problem, now the ad image is showed perfectly with the Erel's recommendation, but if you press on the ad, a message appears: "webpage not available", so I suppose it is not right yet. Would you know the root case? and how to solve it? Thanks again
F FJS Active Member Licensed User Longtime User Jun 30, 2015 #6 I found the solution, and I would like to share it with all of you : WebView1.LoadHtml($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$) Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EqualsIgnoreCase($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$) Then Return False Else Dim i As Intent i.Initialize(i.ACTION_VIEW, Url) StartActivity(i) Return True End If End Sub With this the ad works perfectly. However the ad shows not in the centre of the webview, and I dont know how to do transparent the background of the webview. Please.. anybody knows how to do it?? Thank you Upvote 0
I found the solution, and I would like to share it with all of you : WebView1.LoadHtml($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$) Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EqualsIgnoreCase($"<script type="text/javascript" src="http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxxx"></script>"$) Then Return False Else Dim i As Intent i.Initialize(i.ACTION_VIEW, Url) StartActivity(i) Return True End If End Sub With this the ad works perfectly. However the ad shows not in the centre of the webview, and I dont know how to do transparent the background of the webview. Please.. anybody knows how to do it?? Thank you