Receiving system variable and sending to dropdown

Asked

Viewed 20 times

1

good afternoon.

I’m still in the way of programming with html and javascript. I’ve done a lot of research on what I want here. Some have come close, but not to the point of what I intend.

The scenario is: I have a java system (per browser, specifically I.E.) that has a tab that sends a code to an auto-complete url within an iframe to another system. Ex:

  • I open the system tab and it completes with a predefined variable: http://srv/integ.aspx?=&<product code>
  • It replaces the variable &<product code> by a numerical ID. Ex: 154441

Now I have two systems that need to receive the same code, however in the same tab so I choose which to open. I want to do this for a dropdown. So I created a simple html to make this selection instead of the predefined link above. Precisely I would like the HTML via js to host this variable that would go to the URL.

Is there any method for html to receive this system variable and play it for the dropdown selection items?

I don’t know if I made myself clear, but could someone give me an idea? Thank you!

UPDATE: I remembered that one of the systems receives the ID in the middle of the link. Ex:

http://out/apg/acceptcom= &<product code> inner&scope=repo&sortField=null

1 answer

1

An interesting way would be to put this value in localStorage, this way is cleaner your URL and Voce can rescue this data in a simpler way.

Guarding item: localStorage.setItem('localName',suaVariavel);

Rescuing item: localStorage.getItem('localName')

Removing item : localStorage.removeItem('localName');

Good luck.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.