Selector $w problem

Hoping someone can help please…
I have an onClick handler for one of my elements:

export function container2_click(event, $w) {
$w (“#inputRecipientName”).value = $w (“#textMemberName”);
}

The trouble is, where the first “$w” is used, I am trying to access a text input box on my page called “inputRecipientName”, but inside this function, $w is an argument to the function (which is a selector for a repeater).

How do I access the $w for the whole page, when I am inside a function which has a $w argument?

Hey Mike,

Just change the parameter name - like this:

export function container2_click(event, $w1) {
    $w("#inputRecipientName").value = $w1("#textMemberName");
}

Cheers!

Hi Yisrael,

Thanks for your reply. That’s exactly what I already did. I was shocked that it actually worked!

Take a beer out of petty cash.

Not a bad idea …but I’m fasting today :smiley: