Retriving values to Onclick

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
edalakiran
New User
Posts: 16
Joined: Fri Nov 03, 2017 5:09 pm
First Name: Teja
Last Name: Edala
Company Name: win
City: Cincinnati
State / Province: Ohio
Zip / Postal Code: 45249
Country: United States
Contact:

Retriving values to Onclick

Post by edalakiran »

Hi,

i have a output field like [xyz123]. it will retrieve some data from database, it was hidden, i want to pass that information to the onclick Event, before when it was not hidden i tried " var test = document.getElementById('xyx123').innerHTML;" i got the data but when it was hidden i was unable to retrieve the data, is there any way to assign directly variable in onclick event.

Anyhelp would be appreciated.

Thanks
Kiran.
User avatar
Emily
Profound Logic Staff Member
Posts: 89
Joined: Tue Jun 21, 2016 8:30 am
First Name: Emily
Last Name: Seage
Company Name: Profound Logic
Contact:

Re: Retriving values to Onclick

Post by Emily »

Hi Kiran,

If you want to get the value of a hidden output field, you should be able to use the get() API for this. So, you could do something like this in your onclick event:

Code: Select all

var test = get("Element-ID");
Then, the 'test' variable should contain the value of the hidden output field. It's important to note that you will need to change the ID to reflect the appropriate ID of your output field, but this should help with what you're wanting to accomplish. If you need more information on this API, we have a documentation page here: http://www.profoundlogic.com/docs/pages ... Id=3276803.

I hope that this helps!

--Emily
Emily Seage
Support Team Lead
edalakiran
New User
Posts: 16
Joined: Fri Nov 03, 2017 5:09 pm
First Name: Teja
Last Name: Edala
Company Name: win
City: Cincinnati
State / Province: Ohio
Zip / Postal Code: 45249
Country: United States
Contact:

Re: Retriving values to Onclick

Post by edalakiran »

Thank you, That works fine.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests