Posts

Showing posts with the label input

How can we make a verticle range silder in ionic?

Image
Clash Royale CLAN TAG #URR8PPP How can we make a verticle range silder in ionic? I have been trying to make a vertical range slider in ionic and tried to use ion-range. As it is good until it is horizontal but when we tried to make it verticle it does not work. I have tried to make it by HTML input tag it is working fine, but not able to apply any CSS classes. The code for HTML is as follows, <ion-content padding> <ion-scroll scrollY="true"> <div class="timeline"> <div class="cashback-date" [style.padding-top.px]="paddingTop+(sliderValue*50)"> {{date}} </div> <div class="range"> <!-- <div class="range-track" [style.height.px]="cashbackArray.length*50"></div> <div class="range-handle"></div> --> <input class="input-range" [style.height.px]="cashbackArray.length*50" type=...

How can I put an input in the alert() box?

Image
Clash Royale CLAN TAG #URR8PPP How can I put an input in the alert() box? I have a question that i want to insert an input in an a alert box, what thing I have to do for arriving to the result, I need an another tag, attrib, special properities, etc... Thanks. I think coud be like this: <!DOCTYPE html> <html> <head> <title>example</title> </head> <body> <script type="text/javascript"> alert("<input></input>"); </script> </body> </html> I think you need prompt : w3schools.com/jsref/met_win_prompt.asp – juzraai 12 secs ago prompt By clicking "Post Your Answer", you acknowledge that you have read our updated terms ...

Input length is undifined

Image
Clash Royale CLAN TAG #URR8PPP Input length is undifined < Why Input Length Is Undifined Js function calc() { var inp = document.getElementById("inp"); var result = document.getElementById("result"); var inpval = inp.value result.innerHTML = inpval; alert(inp.length); } Html <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <input id="inp" class="inp" Type="number"/> <center> <div id="calc" class="calc" onclick="calc()">Calculate</div> <br /> <br /> <p id="result"></p> </center> </body> </html> Please help me with this code I don't know why I am getting this error whenever I click on function it always shows undifined inpval.length v...

how can i take an input with a textbox1 // use a for loop to count till 50 // and output it in textbox2

Image
Clash Royale CLAN TAG #URR8PPP how can i take an input with a textbox1 // use a for loop to count till 50 // and output it in textbox2 i got a textbox id="t1" that takes one input lets say the input is: 20 i use a nother textbox id="t2" for the output which shoold look like this: 21 22 23 24 25 ... 49 50 1 2 3 4 5 ... max lenght of the "numbers" = 50 with a break after every number i did the following code:: <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript"> function add() { var a = document.getElementById("t1").value; for(i = a; i<51; i++) { a+=i +"<br>"; } document.getElementsByName("t4")[0].value= a; } </script> </head> <body> <input class="t1" type="number" id="t1"> <button onclick="add()">Add</button> <br><br> <input...

Positioning input tag cursor after resizing

Image
Clash Royale CLAN TAG #URR8PPP Positioning input tag cursor after resizing I have a simple input tag in a form element <form> <input type="text" name="" value=""> </form> I wanted the input tag to look really big. So I add this: input { height: 300px; } However, the problem which bugs me is that the cursor of the input tag is located exactly at the centre of the height. I want the cursor to be at the very top. How do I position the cursor? how about using a <textarea> instead? – William Chong 7 mins ago <textarea> An input will only take 1 line of text (hence the cursor is vertically centered), no matter how big it is, so instead, use a textarea – LGSon 7 mins ago ...