Adding ad widgets to web app with html/javascript

  1. 6 days ago

    Hi my name is Zach,

    I'm new to Xojo but loving it so far, especially with my previous experience coming from coding with Vb.net in visual studio. However as you know creating web apps can be a pain in visual studio as I'm not knowledgeable with coding in html/css/javascript. Nor can I really create a cross platform app in visual studio writing vb.net. However there's one thing I was able to do and struggling to figure out with Xojo thus why I'm here. The below code I'd usually add into the markup of a gui web form in visual studio and adjust as necessary. How am I able to do the same thing with Xojo? Your assistance is much appreciated.

    <div style="margin-left: 150px; margin-top: 0px; margin-bottom: 0px;">
    <script type="text/javascript">
    var search = document.getElementById("<%=srchlbl.ClientID%>").innerText;
    amzn_assoc_placement = "adunit0";
    amzn_assoc_tracking_id = "paradiseyourw-20";
    amzn_assoc_ad_mode = "search";
    amzn_assoc_ad_type = "smart";
    amzn_assoc_marketplace = "amazon";
    amzn_assoc_region = "US";
    amzn_assoc_default_search_phrase = search;
    amzn_assoc_default_category = "All";
    amzn_assoc_linkid = "5496a017ae7277c9591d5b95a822107e";
    amzn_assoc_search_bar = "false";
    amzn_assoc_search_bar_position = "";
    amzn_assoc_title = "";
    amzn_assoc_rows = "2";
    </script>
    <script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US"></script>
    </div>
    <script>
    document.getElementById("<%=srchlbl.ClientID%>").style.display = "none";
    </script>

  2. Jean-Yves P

    May 20 Testers, Xojo Pro Answer Europe (France, Besançon)

    I think you can use this : https://docs.xojo.com/ExecuteJavaScript

  3. 5 days ago

    This did help however I have to remove this portion of the code. Found a work around for this still to work, I thank you for your time.

    <script>
    document.getElementById("<%=srchlbl.ClientID%>").style.display = "none";
    </script>

or Sign Up to reply!