Button not Linking to External Link via WixCode

export function button44_click_1(event, $w) {

$w(“#button44”).link = “http://www.google.com”;
$w(“#button44”).target = [“_blank”;](“_blank”;
//wixLocation.to(“http://www.google.com”):wink:
[//wixLocation.to(“http://www.google.com”);](“_blank”;
//wixLocation.to(“http://www.google.com”):wink:
}

The Button .link and .target properties should be set in the page’s onReady() function and not in the button’s event handler. Something like this:

$w.onReady(function () {
    $w("#button44").link = "http://www.google.com";
    $w("#button44").target = "_blank";
});

Delete the onClick() function, and make sure it’s cleared from the Button’s onClick property in the Properties Panel:

Thank you for your response.
It solved the problem for static Link
Now i am trying for Dynamic Link
But the input values are not getting Picked.

$w.onReady( function () {
$w(“#button44”).link = “Share on WhatsApp” + $w(“#input1”).value + “&text=How” + $w(“#input2”).value;
$w(“#button44”).target = “_blank”;
}//TODO: write your page related code here…
);

@yisrael-wix kindly help me for the above code.