Problem with opening a Window in Navigation Bar

  1. last year

    FrujitStudio

    23 Sep 2018 User since 2018
    Edited last year by FrujitStudio

    I have another problem related to the previous one. I used the code given to me in response to the previous entry and it worked, not everywhere. As in the Search Bar field, it works in ImageView, nothing works anymore. I will add that in ImageView I have enabled "Enable Interaction Events".

    Here's the code in ImageView:

    Window1.openIn (Navigation1, {
       Window1.View1.WebView1.url = "https://creolabs.com";
    });

    Here's the code in SearchBar:

    Navigation1.open()
    var addres = SearchBar1.text
    
    if (addres.contains(".com") || addres.contains(".pl") || addres.contains(".org") || addres.contains(".edu") || addres.contains(".info") || addres.contains(".gov")) {
    	Window1.openIn(Navigation1, {
    		Window1.View1.WebView1.url = addres
    	})
    } else {
    	var result;
    	var list = addres.split(" ");
    	for (var next in list) {
    		result = result + "+" + next;
    	}
    	Window1.openIn(Navigation1, {
    		Window2.View1.WebView1.url = "https://www.google.com/search?q=" + result;
    	})
    }
  2. marco

    25 Sep 2018 Administrator User since 2016

    Hi @FrujitStudio I am sorry but I am not sure to understand.
    Can you please let me know what you are trying to achieve?

  3. FrujitStudio

    28 Sep 2018 User since 2018

    I have a home screen like this. I want the page to open after clicking the favicon (ImageView). I had the same problem with SearchBar. I asked for help here and I got the answer and adapted to it. The code given to me worked. I used it in SearchBar and ImageView. Initially it worked but now it does not work in ImageView. I can send a Creo project if I need to.

  4. marco

    4 Oct 2018 Administrator User since 2016

    @FrujitStudio yes please send me a sample project and let me know what you want to achieve. Thanks.

  5. FrujitStudio

    4 Oct 2018 User since 2018

    Here a sample.

  6. marco

    4 Oct 2018 Administrator User since 2016

    @FrujitStudio the problem is that Window2 is outside Navigation1. if you move Window2 inside Navigation then everything works fine and this would be the correct way to proceed.

    If for some reason you need Window2 outside Navigation1 then you need to present it before anything else with a code like:

    Navigation1.open() 
    Window1.openIn(Navigation1, {
        Window1.View1.WebView1.url = "https://creolabs.com";
    });

or Sign Up to reply!