[Solved] Email and mobile number validation on same html5 textbox with button

here is the simple javascript code which will validate both email and phone number. <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script> <script> function ValidateEmail(mail) { var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; // if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value)) if(mail.match(mailformat)) { alert(mail); return (true) } alert(“You have entered an invalid email address!”) return (false) } function validate() { var data=document.getElementById(“email”).value; checkNumberorEmail(); } function phonenumber(inputtxt) { … Read more

[Solved] HTML please Hilp

I tried to understand your question but it is hard to visualize exactly what you want. So I’ll just clean and update your code (i.e. bring it into the 21st Century). Please don’t use the <font> tag or the align attribute anymore. It’s 2016. If this is a heading, use <h1>, not <p>. Tags work … Read more

[Solved] why my jquery code is not working?

Try with following code: <script> $(document).ready(function(){ $(“[id^=tolevel_]”).click(function(){ var currentID = $(this).attr(“id”); var number = currentID.replace(“tolevel_”,””);//get the number in string format number = parseInt(number); var i = number -1; $(“#level_” + i).hide(500,’swing’, function(){ $(“#level_” +(i+1)).show(500, ‘swing’, function(){ }); }); }); $(“[id^=backtolevel_]”).click(function(){ var currentID = $(this).attr(“id”); var number = currentID.replace(“backtolevel_”,””);//get the number in string format number = … Read more

[Solved] How do you position div’s in html5? [closed]

Organizing elements of a web page into columns can actually be quite difficult. Two common solutions to the problem are using bootstrap and flexbox. I use Bootstrap because I am already familiar with it, its sort of the holygrail of HTML/CSS/JS frameworks. Your gonna need to learn some basic familiarity with bootstrap before understanding and … Read more

[Solved] show sql results in php with tables [closed]

In your __construct seem you don’t call the proper function sequence for format (htlm) the row. I think you should change you __construct someway for call beginChildren, current, endChildern properly function __construct($it) { beginChildren(); parent::__construct($it, self::LEAVES_ONLY); current(); endChildren(); } solved show sql results in php with tables [closed]

[Solved] Can’t Find variable ‘$’ but I’ve included jQuery

Move your code after the jQuery initialization: <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”></script> <script src=”./js/bootstrap.min.js”></script> <script src=”./js/docs.min.js”></script> <script> $(“#test”).click(function() { alert(“Handler for .click() called.”); }); </script> solved Can’t Find variable ‘$’ but I’ve included jQuery

[Solved] Accessing a tags value in JQuery [closed]

First of all your html structure is invalid, the starting and ending of tags are not proper: <a> tag and <figure> tag are not closing properly, so have a look into it and correct html first I am posting answer by changing some html: $(‘.addBasket’).click(function(){ // here we have used .siblings as we need to … Read more

[Solved] what is better to represent news in html [closed]

Laying out websites with tables has been frowned upon for around 10 years. For tables, it’s fine, not but for layouts. I would markup some news articles like this: <article> <a href=”https://stackoverflow.com/link-to-article/” title=”article title”> <img src=”link-to-image” alt=”article title”> <h2>Article title</h2> <p>Short description</p> </a> </article> The rest of your question is pretty unclear so would need … Read more

[Solved] CSS BUTTON WITH ICON [closed]

Omg! Format your code! Icons by Bootstrap or Semantic are fonts, not images. So if you want to place a image as an icon on a button you should do something like that: button { background: url(youricon) no-repeat ….; padding-left: 25px; } It just places an image on the leftside of your button and idents … Read more

[Solved] syntax error unexpect something [closed]

Try this: <?php $i=0; foreach($model->authors as $key=>$author) { if(++$i<count($model->authors)) { echo ‘<a href=”http://192.168.171.46:9090/search/index?keyword=’.$author->name.'”>’.$author->name.’;</a>’; } else { echo ‘<a href=”http://192.168.171.46:9090/search/index?keyword=’.$author->name.'”>’.$author->name.’ </a>’; } } Or if you don’t mind a slight change use this because it is a little simpler: <?php $ret=””; foreach($model->authors as $key=>$author) $ret.=($ret?’; ‘:”).'<a href=”http://192.168.171.46:9090/search/index?keyword=’.$author->name.'”>’.$author->name.'</a>’; echo $ret; solved syntax error unexpect something [closed]

[Solved] Find div by text and delete text [closed]

Use :contains to select the div and then filter the contents and remove the node. $(“div:contains(‘DeleteText’)”).contents().filter(function () { return (this.nodeType == 3 && $.trim(this.nodeValue) == ‘DeleteText’); }).remove(); DEMO: http://jsfiddle.net/YkEy5/ 1 solved Find div by text and delete text [closed]

[Solved] transparent pixel renders different on PC and iPhone

To achieve 100% compatibility with all browsers (IE6+), I’ve used recommendation from the following post: Alpha transparent PNGs not displaying correctly in Mobile Safari Even though the above topic is dedicated to the Mobile Safari browser ONLY – I confirm that the practice of settings transparent pixel to more than 1px of width/height is solving … Read more