Assign Value to local Variable through Java Script?

Assign Value to local Variable through Java Script?

  

Hi,

I created the Local Variable "ImgSrc" as String.And In the Expression
<label onclick="" ImgSrc='"+ GetDocument.List.Current.Documents.DocPath +"';document.getElementById('"+ btnRefresh.Id +"').click();""></label>

When I click on the Label the Value are not assign to the Imgsrc Local Variable.In the BtnRefresh Action i need to get the Value of Imgsrc and assign to Iframe.

How to assign the Value to Local Variable through Javascript?

Thanks

Hello, Devaraj

First, I would like to point out that searching for "variable javascript" on these forums would get you to your answer:
http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=Espace-variable-on-Javascript
http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=pass-values-from--a-javascript-funtion

Try to search your question before making a new post.

Anyway, the easiest way to acheive that would be:
  • Create an hidden input field on the screen
  • Point that input field to the local variable you want
  • Rewrite the onclick event to write the value you selected to the hidden field you created
That should do it!

Best regards,
Pedro Magalhães