hotmaddy Posted February 9, 2019 Report Posted February 9, 2019 Whenever I type this URL(http://192.168.1.75/cm?cmnd=increasevolume" ) and hit enter on a web browser, some action happens to my music system. But it's hard to enter URL every time. So I tried to creating a button in HTML(see below). But when I click the button obviously it takes to that URL. I want the action to happen but stay on the same page. How to do?? TIA. <button onclick="window.location.href='http://192.168.1.75/cm?cmnd=increasevolume''">Continue</button> Quote
Roll_Tide Posted February 9, 2019 Report Posted February 9, 2019 non IT here searching for volume button 1 Quote
Katara Posted February 9, 2019 Report Posted February 9, 2019 6 minutes ago, hotmaddy said: Whenever I type this URL(http://192.168.1.75/cm?cmnd=increasevolume" ) and hit enter on a web browser, some action happens to my music system. But it's hard to enter URL every time. So I tried to creating a button in HTML(see below). But when I click the button obviously it takes to that URL. I want the action to happen but stay on the same page. How to do?? TIA. <button onclick="window.location.href='http://192.168.1.75/cm?cmnd=increasevolume''">Continue</button> Target=# pettali, javascript rasi ajax call cheyochu Quote
Paidithalli Posted February 9, 2019 Report Posted February 9, 2019 Button ki href pedithe saripothadhi kadha Quote
karthikn Posted February 9, 2019 Report Posted February 9, 2019 20 minutes ago, hotmaddy said: Whenever I type this URL(http://192.168.1.75/cm?cmnd=increasevolume" ) and hit enter on a web browser, some action happens to my music system. But it's hard to enter URL every time. So I tried to creating a button in HTML(see below). But when I click the button obviously it takes to that URL. I want the action to happen but stay on the same page. How to do?? TIA. <button onclick="window.location.href='http://192.168.1.75/cm?cmnd=increasevolume''">Continue</button> why you need browser ..it's just a GET request.. so use curl curl <ur> .. html might be overkill... but you need to send an ajax request.. Quote
Mitron Posted February 9, 2019 Report Posted February 9, 2019 36 minutes ago, Spartan said: manodu wmrt e location? Quote
Spartan Posted February 9, 2019 Report Posted February 9, 2019 Just now, Mitron said: manodu wmrt e location? filims spelling in thumbnail check 1 Quote
Mitron Posted February 9, 2019 Report Posted February 9, 2019 6 minutes ago, Spartan said: filims spelling in thumbnail check Quote
rrc_2015 Posted February 9, 2019 Report Posted February 9, 2019 make an ajaxrequest when button is clicked.... U shouldn’t open window on each click of button Quote
rrc_2015 Posted February 9, 2019 Report Posted February 9, 2019 1 minute ago, rrc_2015 said: make an ajaxrequest when button is clicked.... U shouldn’t open window on each click of button Send a Request To a Server To send a request to a server, we use the open() and send() methods of the XMLHttpRequest object: xhttp.open("GET", "url", true); xhttp.send(); Quote
hotmaddy Posted February 9, 2019 Author Report Posted February 9, 2019 2 hours ago, Spartan said: Baa. Thanks. Quote
hotmaddy Posted February 9, 2019 Author Report Posted February 9, 2019 2 hours ago, Paidithalli said: Button ki href pedithe saripothadhi kadha href pedithe. A url unna page open avuthundi. I don't want that page to open but I want the action to happen. Quote
hotmaddy Posted February 9, 2019 Author Report Posted February 9, 2019 2 hours ago, karthikn said: why you need browser ..it's just a GET request.. so use curl curl <ur> .. html might be overkill... but you need to send an ajax request.. I will google. for curl. Thanks. Quote
hotmaddy Posted February 9, 2019 Author Report Posted February 9, 2019 2 hours ago, Katara said: Target=# pettali, javascript rasi ajax call cheyochu Will do more research. I don't know what ajax is. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.