Jump to content

farbods0

Members
  • Posts

    16
  • Joined

  • Last visited

About farbods0

  • Birthday 12/31/1991

Contact Methods

  • AIM
    visualexstasy

farbods0's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Sorry this is what it's like <script type="text/javascript"> $(document).ready(function() { var dropDown = [" ","Run1", "Run2", "Testplan", "Rails", "Europa"]; var dropDownID = [" ","111111", "222222", "333333", "444444", "555555"]; $("#dropDown").select2({ data: dropDown }); //Adding ID to dropdown menu $("#dropDown").change(function() { $("#dropdownID").val(dropDownID[$("#dropDown option:selected").index()]); }); $(document).ready(function(){ $("#dropdownID").keypress(function(){ $("#dropdownID").val(dropDownID[$("#dropDown option:selected").index()]); }); }); }); </script> <!--ID REF--> <br><br> Testrail Plan ID:<input type="text" id="dropdownID"><br><br>
  2. Lol well that was a different response than expected
  3. Hmm I tried that but it just deletes anything you type into the inputbox. What I was looking for was to clear the dropdown selection if a user starts typing into the input box.
  4. I tought i was getting the hang of this, but its not working
  5. $(document).ready(function(){ $("input").keypress(function(){ Along these lines?
  6. Wow can't believe that was the reason. Thank you so much it works now!! Now need to figure how to remove the dropdown selection if the user types into the input box
  7. Hmm strange I did it like you asked, (even changed the link) but still nothing gets populated in the Plan ID: box https://jsfiddle.net/vba66zds/2/
  8. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Test Modify </title> </head> <body> <p>Load Previous Run or Load Test Plan ID.</p> <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script> <!--Drop down menu with search function--> <script type="text/javascript"> $(document).ready(function() { var dropDown = [" ","Run1", "Run2", "Testplan", "Rails", "Europa"]; var dropDownID = [" ","111111", "222222", "333333", "444444", "555555"]; $("#dropDown").select2({ data: dropDown }); }); </script> <div> <select id="dropDown" style="width:300px;"> <!-- Dropdown List Option --> </select> </div> <!--TRPID Input box--> <br><br> Testrail Plan ID:<input type="text"><br><br> <!--Makes the window size smaller--> <script type="text/javascript"> window.resizeTo(500,300); </script> <!--Function for ready to call test plan--> <script type="text/javascript"> var sUserName=""; function fnCallDialog() { showModelessDialog("testLaunch.hta",window,"status:false;dialogWidth:300px;dialogHeight:300px"); } </script> <input type= "button" onclick="location.href='http://linux28.aquantia.com/testrail/index.php?/plans/view/testPlanID';" value="Open Testrail Test Plan for Modiciation"/><br><br> <input type= "button" value="Ready to Launch Test Plan" onClick="fnCallDialog()"> </body> </html> Sorry about that, its just my first time doing html, but I fixed all the errors now but I still can't figure out where to play that snippet of code you sent
  9. <!DOCTYPE html> <p>Load Previous Run or Load Test Plan ID.</p> <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var dropDown = [" ","color", "shape", "tool"]; var dropDownID = [" ","orange", "square", "hammer"]; $("#dropDown").select2({ data: dropDown }); $("#dropDown").change(function() { $("#dropdownID").val(dropDownID[$("#dropDown option:selected").index()]); }); }); </script> </head> <body> <div> <select id="dropDown" style="width:300px;"> <!-- Dropdown List Option --> </select> </div> </body> <!--TRPID Input box--> <br><br> Testrail Plan ID:<input type="text" TTPID="PlanID"><br><br>
  10. I don't know what you mean by validating, I went through the validator link you sent, typed in the code and it says 3 invalid but I run the code and it still runs fine
  11. <p>Load Previous Run or Load Test Plan ID.</p> <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var dropDown = [" ","color", "shape", "tool"]; var dropDownID = [" ","orange", "square", "hammer"]; $("#dropDown").select2({ data: dropDown }); $("#dropDown").change(function() { $("#dropdownID").val(dropDownID[$("#dropDown option:selected").index()]); }); }); </script> </head> <body> <div> <select id="dropDown" style="width:300px;"> <!-- Dropdown List Option --> </select> </div> </body> <!TRPID Input box-> <br><br> Testrail Plan ID:<input type="text" TTPID="PlanID"><br><br>
  12. Tried it still didn't work. Its still not populating the input field
  13. Sorry I placed that snippet into my code but nothing seems to have changed
  14. Hi is there a way to have a drop down menu insert its dictionary value into a textbox? For example lets say dropdown shows , shape, tool. When you click the color option then "orange" would populate the textbox, if you select shape then "square" would populate, so on and so forth. Also when you type something into the textbox the dropdown selected item disappears. <!Drop down menu with search function-> <p>Load Previous Run or Load Test Plan ID.</p> <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var dropDown = [" ","color", "shape", "tool"]; var dropDownID = [" ","orange", "square", "hammer"]; $("#dropDown").select2({ data: dropDown }); }); </script> </head> <body> <div> <select id="dropDown" style="width:300px;"> <!-- Dropdown List Option --> </select> </div> </body> <!TRPID Input box-> <br><br> Testrail Plan ID:<input type="text" TTPID="PlanID"><br><br>
  15. Where would i put that exactly? Like can i give you my whole code. Also I thought it would involve something like this {block:TagPage} {/block:TagPage}
×
×
  • Create New...