I am looking to append a var to a url with a function that i have bounf to a click event.
Say the url is www.example.com
after running the function it becomes.
www.example.com?folder=beats
I have got the function grabbing the right folder value but need to append it to the current page url.
function fileDialogStart() {
$folder = $('#ams3Folder').val();
}
any help
function fileDialogStart()
{
var newURLString = window.location.href +
"?folder=" + $('#ams3Folder').val();
window.location.href = newURLString; // The page will redirect instantly
// after this assignment
}
For more information, go here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With