• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] How can I send more information via GET method?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] How can I send more information via GET method?

    Hi, my name is ivan, and I'm new with valence and ExtJs

    i need help with Valence portal.

    I open the app with direct link here:
    Code:
    http://192.168.1.1:7040?display=desktop&app=1001
    but I need more data on path, PE: 'CODUSER', but if I put &coduser=1 doesn't work

    Code:
    http://192.168.1.1:7040?display=desktop&app=1001&coduser=1
    I execute an alert and this is the result to read the URL:

    Code:
    http://192.168.1.1:7040/desktop/examples/P01/index.html?app=1001&key=xxxxxxx&lang=en
    URL doesn't contains the "coduser".

    How can I send more information via GET method?

    also I try take the url with Javascript but when i execute location.href or document.url obtain this:

    Code:
    http://192.168.1.1:7040/desktop/examples/P01/index.html?app=1001&key=xxxxxxx&lang=en
    this doesn't include "coduser"

    any suggestion?

    Thanks, Ivan.

  • #2
    I found a solution to my problem. Not is the best solution but is an aceptable solution, if any knows other, tell me, please.

    My Solution:
    I created a new Hook.js. on this file can read a current url (here read all url, 'coduser' included).

    on the new Hook:

    cod=foundParameterURL('codUser');//personal function, include current URL (location.href)
    Ext.util.Cookies.set("coduser",cod);

    later on the app, read the Cookie:

    var cod = Ext.util.Cookies.get("coduser");

    and continue with normality

    If any knows as send information Hook.js to app tell me please.

    thanks for all, Ivan.

    Comment


    • #3
      Hi Ivan,

      Does your application take many different "coduser" values or is it just a couple different values? Reason I am asking is because you can add an application reference in Valence multiple times with different optional parameters in Portal Admin.

      Screen Shot 2014-04-15 at 8.19.15 AM.jpg

      If you can pass many different values of "coduser" then I would suggest pulling the parameter from the portal by referencing parent which is the portal.

      Example
      Code:
      var coduser = parent.Ext.getUrlParam('coduser');
      Hopefully that helps.

      Comment


      • #4
        thanks Johnny, this is "The solution" (very easy and very good solution).

        really thanks.

        Comment

        Working...
        X