Browser Component Problems

OS info

  • Operating System : Windows 10.0.17134
  • Wappler Version : 2.1.7

Problem description

No browser control is available in App Connect in version 2.1.7 . I earlier version of 2.1.5 it was there are worked but the ternary function did not work correctly as it ignored the logic.

Steps to reproduce

  1. Attempt to access a Browser App control

Hello,
it’s right there, under the components menu:

i don’t really understand the ternary operator part.

Thanks

Well, click on components and select it.
Also - do you see it when you click on the extensions icon (in the left panel)?

Yes I found them in both locations. Clicked on it an it appears on page. However it does not appears to work correctly. Here is the code:

<form id="login1" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/Security/SetUp.aspx" dmx-on:unauthorized="browser1.alert('Whoops Wrong Entry')" dmx-on:success="browser1.goto('liaisonredirect.html')">

On authorized ( success) log in the page should be redirected to liaisonredirect.html. In gact it gets redirected to another page userinformation.html.

the original code was on:success=browser1.goto( form1.data.query[0].role==‘Yes’ ? ‘liaisonredirect.html’ : ‘userinformation.html’.

However this never worked as even if role=Yes, the return appeared False and the redirect went to userinformation.html.

I then changed it to just a plain redirect, but it doesn’t reflect the correct redirect file?

I have no idea how to correct this .

Then what do you mean by: “No browser control is available in App Connect in version 2.1.7”

I need a link to a page where I can test this.

Sorry, I’m a bit confused by your explanation.

Link:
wldgroup.com/DotNet/SignInOld.html

Use WLD as User Name, WLD1234 as pwd. It should return to liaisonredirect.html.

Well it does and then when your liaisonredirect.html page loads in the browser it redirects to some other page. I see nothing wrong in the redirect action, can you clarify please?

You are correct, is a simple redirect, the target page was in turn redirecting to userinformation. I verfied this by changing the target page to pagedrevenues.html which doesn’t exist.

However, when I use the following code:

<form id="login1" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/Security/SetUp.aspx" dmx-on:unauthorized="browser1.alert('Whoops Wrong Entry')" dmx-on:success="browser1.goto(login1.data.query1[0].Role=='y' ? ' userinformation.htm' : 'pagedrevenues.html'l)">

Which is meant to compare the value of “role” as being ‘y’ =true, with target page = userinformation.html and if the value of “role” is anything but y, then the return is False and it should redirect to pagedrevenue.html.

If you use WLD, WLD1234, in which role is y, and then JB JB4321 as another entry with role = ‘none’ then you can see what happens. It was this problem that started all the awkward redirects in the earlier pages.

For some reason the code did not get transmitted: It is as follows:

Please wrap your HTML code in 3 backticks: `

<form id="login1" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/Security/SetUp.aspx" dmx-on:unauthorized="browser1.alert('Whoops Wrong Entry')" dmx-on:success="browser1.goto(login1.data.query1[0].Role=='y' ? ' userinformation.htm' : 'pagedrevenues.html'l)">

Thys symbol should not be there:

'pagedrevenues.html'l) - referring to the l

Many thanks, I have to improve my typing skills.

Nope that didn’t do it. In the current case, it takes all the responses as TRUE, even through the role for JB is ‘None’ and not ‘y’, which should be a false return and redirecting to pagedrevenue.html.

Here is the code
<form id="login1" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/Security/SetUp.aspx" dmx-on:unauthorized="browser1.alert('Whoops Wrong Entry')" dmx-on:success="browser1.goto(login1.data.query1[0].Role=='y' ? ' userinformation.html' : 'pagedrevenues.html')">

Ok, I’ll inspect your page

@wld
I’ve checked your page and the problem is the query you check for the redirect. It is not properly filtered by the logged user id (on the SignInOld.html page) and the action="dmxConnect/api/Security/SetUp.aspx returns many users, while you only need the logged user details:

I do not understand why the filter does not work? I followed the tutorials step by step. I also am unable to reproduce the results that you show.

Please show a screenshot of how is your query filter set up in the Security/SetUp server action.

You only seem to filter the query in the Security/UserDetails server action, and not the one on the login page :slight_smile:

I am clearly missing something. I do not know how to filter a query on the login page other than establish a serverconnection using User Details. I removed the former SetUp and now call it LogIn. Although it seems to continue to function as Setup.aspx in the SignInOld.html page.