javascript not working on this following code -


those following code isnot working...

firstly want these selected value (by sentvalue() , receivevalue())

and want use selected value on another(sent()) function ..

this html code

<select class="form-control"  id="sents" onchange="sentvalue(this) " >         <option value="0" >-- select 1 --</option>         <option value="1" ">1</option>         <option value="2" >2</option>         <option value="3" >3</option>         <option value="4" >4</option>         <option value="5" >5</option>         <option value="6" >6</option>         <option value="7" >7</option>         </select>         <select class="form-control" id="receives" onchange=" receivevalue(this); counter2(this); " >         <option value="0">-- select 1 --</option>         <option value="1" onclick="i();">1</option>         <option value="2" >2</option>         <option value="3" >3</option>         <option value="4" >4</option>         <option value="5" >5</option>         <option value="6" >6</option>         <option value="7" >7</option>         </select> <input type="number" id="sent2" onkeyup="sent()" class="form-control" name="number"> <p class="form-control" id="receive2" type="number" name="number" disabled> 

i want use receivevalue() , sentvalue() on sent() function not work.

var x,y; function receivevalue(selv) {  var y = selv.options[selv.selectedindex].value;} function sentevalue(selv) {  var x= selv.options[selv.selectedindex].value; }      function sent(){         receivevalue();         get=y;         sentvalue();         put=x;         if(get==1 && put==1){             var userinput=document.getelementbyid('sent2').value;             var news=(userinput/88).tofixed(2);             document.getelementbyid('receive2').innerhtml=news;         }     } 

i want sentvalue() variable x , receivevalue() variable y on sent() function . please solve problem..


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -