Updated parameter on Javascript not working when passed to popup link

Updated parameter on Javascript not working when passed to popup link

  
Hello,

I bound my variable on an input field and I am changing its value on javascript using jQuery:

Onclick of a button:
 $('#"+tempField.Id+"').val("test");
I am sure it changes cos I am seeing the value on the input field change.
However, if I pass this "should be updated" variable on a link as a parameter and when I click on the link it doesn't pass the updated value of the variable.
Any thoughts??

Gino



I found this solution:

http://www.outsystems.com/forums/discussion/10168/passing-parameter-to-pop-up-page/

I am using a pop-up btw and I see this occurs on pop-ups because of the method Navigate. My question is, is this the best way to solve this problem?

Thanks
Hi Gino,

As you said the link is rendered with the initial value and is not updated (unless you take some action) when you change that value on the input. Two thoughts:
  1. Use the same javascript script to update the link
  2. Implement an onchange callback on the input so that you update the link on the screen
Cheers
André Vieira wrote:
Hi Gino,

As you said the link is rendered with the initial value and is not updated (unless you take some action) when you change that value on the input. Two thoughts:
  1. Use the same javascript script to update the link
  2. Implement an onchange callback on the input so that you update the link on the screen
Cheers
 
Hi Andre thanks for the response.

Will this be the best solution for this? I found a bug when you update the input value and QUICKLY click the link that uses the input value as parameter it doesn't reflect instantly! What I do is (another hack, which I hate) use a setTimeout call when clicking the link for the input value to be able to load completely before processing the link.

I really want the BEST approach for this problem.

Thanks in advance,
Gino

You can use the same javascript to disable to link while you are updating it...
André Vieira wrote:
You can use the same javascript to disable to link while you are updating it...
 You just offered an alternative hack. I take it this is the best way to do it. Thanks.