Button ng-class doesn't apply

Issue I am trying to create custom pager for ion-slide-box. This is codepen sample This is my js: $scope.currentSlide = 0; $scope.pagerClick = function (index) { $ionicSlideBoxDelegate.slide(index); } $scope.slideChanged = function (index) { $scope.currentSlide = index; } This is html

Continue reading

Bad syntax of expression in ng-class?

Issue I am learning Angular.js and I have this piece of code: <button ng-class=”{‘btn pull-left’, duplicatesInList === true ? ‘btn-warning’: ‘btn-success’}” id=”saveScoreButton” type=”button” ng-click=”add()”><button> And something is wrong with syntax but I have no idea what… What I want to

Continue reading

Android button onclick override

Issue I would like to create a CustomButton which has a predefined onClick. In fact, my object would do the same job than CustomButton mButton = getViewById(..); mButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { show_something() } Is there

Continue reading

Make WPF button look less flat

Issue I’ve got 2 buttons on my form, and they both look very, very flat. I can’t seem to find a way to make them look more like: The XAML for my buttons is: <Button x:Name=”bttnDailyReport” HorizontalAlignment=”Left” Margin=”618,27,0,0″ VerticalAlignment=”Top” Width=”121″

Continue reading

angular button rating with collapse

Issue The objective is to combine the rating provided here in example: http://angular-ui.github.io/bootstrap/#/rating w/ the collapse here: http://angular-ui.github.io/bootstrap/#/collapse Is it possible to make use the rating implementation and have each star binded to a unique collapse and message.(i.e. clicking 1

Continue reading

Why is my button not appearing on the page?

Issue I have this form in a partial: <%= form_for current_user.relationships.build(:followed_id => @profile.user.id) do |f| %> <div><%= f.hidden_field :followed_id %></div> <div class=”follow_button”><%= f.submit “Follow” %></div> <% end %> that is rendered to my profile view. Here is the resulting html:

Continue reading

HTML & Angular Material disable save button from outside div when form fields are empty

Issue I have the following Angular Material form with the Close and Save buttons in an outside div for design reasons: <h1 mat-dialog-title>Product Page</h1> <div mat-dialog-content> <form [formGroup]="productForm"> <mat-form-field appearance="outline"> <mat-label>Name</mat-label> <input formControlName="name" required matInput placeholder="Name" style="text-transform:uppercase"> </mat-form-field> <mat-form-field appearance="outline">

Continue reading

Get Value of Input Button When Clicked for Only One Button?

Issue So I made this formula for my input button function addTip() { let tip = document.querySelectorAll("input[type=button]"); tip.forEach((item) => { item.addEventListener("click", (event) => { console.log(item.value); }); }); } HTML <input type="button" value="3" onClick="addTip()"> <input type="button" value="5" onClick="addTip()"> <input type="button" value="7"

Continue reading

basic onclick button in a html form

Issue When i put a basic onclick button in a form it doesn’t work : (even with the type="button") function action(div) { var x = document.querySelector(div); if (x.style.display == ‘block’) { x.style.display = ‘none’; } else { x.style.display = ‘block’;

Continue reading

Apple pay button not showing in HTML web site

Issue I have an HTML file where I added code like described here: https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_javascript So my HTML code looks like this: <!DOCTYPE html> <html> <head> <script src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"></script> <style> apple-pay-button { –apple-pay-button-width: 140px; –apple-pay-button-height: 30px; –apple-pay-button-border-radius: 5px; –apple-pay-button-padding: 5px 0px; }

Continue reading

Change color of button with javascript

Issue I’m having trouble changing the color of a button with a simple function, the color doesn’t change at all. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="JavaScript"> function changeColor(){ document.getElementsByTagName(‘button’).style.backgroundColor="green"; } </script> </head> <body > <form action="/action_page.php" method="get"

Continue reading

CSS: Hover a HTML submit button

Issue I’m trying to style a HTML submit button in CSS: HTML: <input type="submit" value="Yes" id="popUpYes"> CSS: #popUpYes { width: 60px; height: 30px; background-color: black; } #popUpYes:hover { background-color: white; } The basic style works but the background does not

Continue reading

How do I change a button size in javascript

Issue I’m using javascript to create buttons in a chrome extension but I can’t find a way to change the size of the button, here’s the code. var buttonShort = document.createElement(“button”); buttonShort.innerHTML = “Generate Short Password”; var body = document.getElementsByTagName(“body”)[0];

Continue reading

Making an image act like a button

Issue I’m working on a simple HTML page where I have this image that I want to act as a button. Here is the code for my image: <div style=”position: absolute; left: 10px; top: 40px;”> <img src=”logg.png” width=”114″ height=”38″> </div>

Continue reading

CSS: Hover a HTML submit button

Issue I’m trying to style a HTML submit button in CSS: HTML: <input type="submit" value="Yes" id="popUpYes"> CSS: #popUpYes { width: 60px; height: 30px; background-color: black; } #popUpYes:hover { background-color: white; } The basic style works but the background does not

Continue reading

Change color of button with javascript

Issue I’m having trouble changing the color of a button with a simple function, the color doesn’t change at all. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="JavaScript"> function changeColor(){ document.getElementsByTagName(‘button’).style.backgroundColor="green"; } </script> </head> <body > <form action="/action_page.php" method="get"

Continue reading

How do I change a button size in javascript

Issue I’m using javascript to create buttons in a chrome extension but I can’t find a way to change the size of the button, here’s the code. var buttonShort = document.createElement(“button”); buttonShort.innerHTML = “Generate Short Password”; var body = document.getElementsByTagName(“body”)[0];

Continue reading

get value from the button element that I click

Issue I have three button in html: <button value="Rock" onclick="displayResult()">Rock</button> <button value="Paper" onclick="displayResult()">Paper</button> <button value="Scissors" onclick="displayResult()">Scissors</button> In displayResult() function (wrriten once for 3), how can I get value from the button that I click? If I set ids for all

Continue reading

Clear button should not required field HTML5

Issue im creating the form include below code : <asp:TextBox ID=”txtPhone” required=”required” runat=”server” placeholder=”Phone No. (eg. 999)” CssClass=”glowStyle”></asp:TextBox> <br /> <asp:Button ID=”btnAddDriver” Text=”Add” runat=”server” CssClass=”button” /> <br /> <asp:Button ID=”btnCnclAddDriver” Text=”Clear” runat=”server” CssClass=”cancelbutton” onclick=”btnCnclAddDriver_Click” /> </form> when i click the

Continue reading

Clear button should not required field HTML5

Issue im creating the form include below code : <asp:TextBox ID=”txtPhone” required=”required” runat=”server” placeholder=”Phone No. (eg. 999)” CssClass=”glowStyle”></asp:TextBox> <br /> <asp:Button ID=”btnAddDriver” Text=”Add” runat=”server” CssClass=”button” /> <br /> <asp:Button ID=”btnCnclAddDriver” Text=”Clear” runat=”server” CssClass=”cancelbutton” onclick=”btnCnclAddDriver_Click” /> </form> when i click the

Continue reading

Clear button should not required field HTML5

Issue im creating the form include below code : <asp:TextBox ID=”txtPhone” required=”required” runat=”server” placeholder=”Phone No. (eg. 999)” CssClass=”glowStyle”></asp:TextBox> <br /> <asp:Button ID=”btnAddDriver” Text=”Add” runat=”server” CssClass=”button” /> <br /> <asp:Button ID=”btnCnclAddDriver” Text=”Clear” runat=”server” CssClass=”cancelbutton” onclick=”btnCnclAddDriver_Click” /> </form> when i click the

Continue reading

get value from the button element that I click

Issue I have three button in html: <button value="Rock" onclick="displayResult()">Rock</button> <button value="Paper" onclick="displayResult()">Paper</button> <button value="Scissors" onclick="displayResult()">Scissors</button> In displayResult() function (wrriten once for 3), how can I get value from the button that I click? If I set ids for all

Continue reading

get value from the button element that I click

Issue I have three button in html: <button value="Rock" onclick="displayResult()">Rock</button> <button value="Paper" onclick="displayResult()">Paper</button> <button value="Scissors" onclick="displayResult()">Scissors</button> In displayResult() function (wrriten once for 3), how can I get value from the button that I click? If I set ids for all

Continue reading

a tag as a submit button?

Issue Hi I am trying to get “a” tag as a submit button. I found a code somewhere in the web. But it didn’t work. <a href=”#” onclick=”this.form.submit()”>Submit</a> Is there any code for to achieve my need? Solution Give the

Continue reading