[Solved] Drop Down menu not working any idea why? [closed]

[ad_1] You’re closing your <li>-s in the wrong place – DEMO It should wrap the submenu <ul> <li><a href=”#”>Testimonials</a> <ul> <li><a href=”#”>Client Reviews</a></li> <li><a href=”#”>Employee Reviews</a></li> <li><a href=”#”>Success Stories</a></li> <li><a href=”#”>Featured Employees</a></li> </ul> </li> 1 [ad_2] solved Drop Down menu not working any idea why? [closed]

[Solved] Function to round number to nearest “smooth” number [closed]

[ad_1] OPTION 1 You could use .toPrecision() It is explained in more detail here but basically you can specify the number of significant figures, e.g. function precise(x) { return Number.parseFloat(x).toPrecision(1); } console.log(precise(54)); // output: “50” console.log(precise(2051075640)); // output: “2000000000 ” console.log(precise(‘99.999’)); // output: “100” OPTION 2 If you wanted to always round up or always … Read more

[Solved] How do I remove all strings containing digits before “hs” like “18hs” from a list of strings? [closed]

[ad_1] >>> import re >>> words = [“hello”, “18hs”, “18aaa”, “21hr”] >>> [w for w in words if not re.match(r’\d+h’, w)] [‘hello’, ’18aaa’] This loops over the list and keeps the items that don’t match the regex \d+h, which means “one or more digits followed by an h”. If you need to keep strings like … Read more

[Solved] ask import undefined Go

[ad_1] function start with lower case is an unexport function. An unexport function can be used only inside the package. You have to export getRoute function by changing the function name to GetRoute. [ad_2] solved ask import undefined Go

[Solved] PHP Session ID issue [closed]

[ad_1] You have one fundamental problem: if ( !isset( $_SESSION ) ) $_SESSION = null; if ( ( !is_array( $_SESSION ) ) xor ( !isset( $_SESSION[‘nzshpcrt_cart’] ) ) xor ( !$_SESSION ) ) session_start(); You can’t access the session before it is started. Try starting it and then accessing it… Also xor is a bitwise … Read more

[Solved] .on method in jquery [closed]

[ad_1] $(function(){ $(document).on(‘click’,’.mydiv’, function(){ //my code}); }); When delegating events you listen for any click on an element that exists on the time of binding, as event handlers can only be attached to elements that actually exists in the DOM on the time of binding, this would be the first element in the statement above, … Read more

[Solved] Javascript email validation does not work

[ad_1] Like suresh suggested, you should remove the quotes (“) around your regex string. So your first line should be: var re = /^(([^<>()[\]\\.,;:\s@\”]+(\.[^<>()[\]\\.,;:\s@\”]+)*)|(\”.+\”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; I produced a working example below: <script> function test() { var re = /^(([^<>()[\]\\.,;:\s@\”]+(\.[^<>()[\]\\.,;:\s@\”]+)*)|(\”.+\”))@((\[[0-9] {1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var email= “[email protected]”; if (re.test(email) == false) { alert(“invalid email address”); return; } alert(“valid address”); } … Read more

[Solved] Data inserting in mysql data base not working [closed]

[ad_1] response_id,participant_id,question_id,answer_option_answer_text vs (response_id,participant_id,question_id,answer_option) and your line ” $participant_id=$_POST[‘participant_id’] ” is missing its semicolon (;) also please use if( !mysql_query( $query, $con ) ) { echo(“Failure: ” . mysql_error() ); } to insert data. 2 [ad_2] solved Data inserting in mysql data base not working [closed]