Jump to content

HTML experts please cum here


hotmaddy

Recommended Posts

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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.. 

Link to comment
Share on other sites

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();
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

2 hours ago, Katara said:

Target=# pettali, javascript rasi ajax call cheyochu

Will do more research. I don't know what ajax is.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...