[Solved] Why is my HTML table not showing properly? [closed]

You need to have a 1 to 1 row to row and 1 to 1 cell to cell <?php $sql = “SELECT local_name FROM storms”; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { ?> <tr> <td><?= $row[“name”] ?></td> <td><?= $row[“local_name”] ?></td> …. </tr> <? } } ?> solved Why is … Read more

[Solved] Can I call a .java file from a .html file with href or something else without using javascript in-between [closed]

Updated from OP comment: Thank you very much for your reply and let me correct the question can I call a function which is written in java directly from a html. – JAVA Coder Nov 5 at 9:08 Still the same answer. Methods or functions, terminology aside. What you’re proposing is like trying to power … Read more

[Solved] Select an element with Javascript [duplicate]

You can use .querySelectorAll() to select all div elements with an id, iterate NodeList of div elements, attach click handler within a loop <div id=”1″></div> <div id=”2″></div> <div id=”3″></div> <div id=”4″></div> <div id=”5″></div><br> <div id=”6″></div> <div id=”7″></div> <div id=”8″></div> <div id=”9″></div> <div id=”10″></div><br> <div id=”11″></div> <div id=”12″></div> <div id=”13″></div> <div id=”14″></div> <div id=”15″></div><br> <div id=”16″></div> … Read more

[Solved] Limit sum value after 5 clicks [closed]

Here is one way to do it. let sum = 0; let clicks = 0; $sum = $(“.sum”); $clicks = $(“#clicks”); $(“.combat”).on(“click”, function(){ if(clicks >= 5) return; clicks += 1; $clicks.text(`clicks:${clicks}`); const $this = $(this); const val = parseInt($this.text()); if(sum + val <= 100){ sum += val; $sum.text(`sum:${sum}`); } }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> <div class=”container”> <table> … Read more

[Solved] How can i do this in css/html?

.outer{ width: 300px; height: 300px; position: relative; } .outer > .inner{ background: rgba(0,0,0,0.9); color: #fff; position: absolute; padding: 10px; right: 0; bottom: 0; left: 0; z-index:1; } <div class=”outer” style=”background:url(http://lorempixel.com/600/300/)center center no-repeat;background-size:cover”>&nbsp;<div class=”inner”>Some text here</div></div> 0 solved How can i do this in css/html?

[Solved] Why are images not showing on website?

You can use this code: $(function() { $(“.img-w”).each(function() { $(this).wrap(“<div class=”img-c”></div>”) let imgSrc = $(this).find(“img”).attr(“src”); $(this).css(‘background-image’, ‘url(‘ + imgSrc + ‘)’); }) $(“.img-c”).click(function() { let w = $(this).outerWidth() let h = $(this).outerHeight() let x = $(this).offset().left let y = $(this).offset().top $(“.active”).not($(this)).remove() let copy = $(this).clone(); copy.insertAfter($(this)).height(h).width(w).delay(500).addClass(“active”) $(“.active”).css(‘top’, y – 8); $(“.active”).css(‘left’, x – 8); setTimeout(function() … Read more

[Solved] Bootstrap single full width column

You can use bootstrap col-12 class or just use a simple div to make it full width everywhere. Here is the working example using bootstrap col-12 class: .col-12 { background-color: #dedede; } .content { background-color: #abaaba; } <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” integrity=”sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm” crossorigin=”anonymous”> <div class=”container-fluid”> <div class=”row”> <div class=”col-12″> <h1>Welcome back User!</h1> </div> </div> </div> <!– … Read more

[Solved] How to implement these kinds of style (in pictures below) with HTML & CSS [closed]

Even if the inner content it’s not an image, in both case you could use <figure> and <figcaption>, e.g. Codepen demo Markup <figure aria-labelledby=”figure-1-1″ class=”f1″> <figcaption id=”figure-1-1″>Title of the figure</figcaption> … </figure> <figure aria-labelledby=”figure-1-2″ class=”f2″> <figcaption id=”figure-1-2″>Title of the figure</figcaption> … </figure> CSS .f1, .f2 { border: 1px #9bc solid; position: relative; border-radius: 5px; min-height: … Read more

[Solved] Tic Tac Toe program by using Javascript [closed]

The code is not related to Tic-Tac-Toe. This is general JavaScript code. Not Specific. All this do is check whether a document.all is present and whether getElementById function is present or not. Which is true for present World. document.all list all elements and document.getElementById is a function which return the element with id that match … Read more

[Solved] A link on my website is hijacked? [closed]

In generated pages source HTML you can see the next line: <td width=73><a href=”http://www.software.com.au”><img src=”images/but_top_home.gif” width=”73″ height=”16″ border=”0″ alt=”sports software” ></a></td> So pay attention to your source code. solved A link on my website is hijacked? [closed]

[Solved] HTML- pass data to perl script [closed]

You can’t pass data from HTML to a program directly, you would normally submit a form to a URI and configure the webserver to pass the submitted data to a program and the program’s output back to the webbrowser. There are several common ways to do this solved HTML- pass data to perl script [closed]

[Solved] How to keep the previous answer selected? (javascript quiz) [closed]

Add answer array to store the answers var answers = []; update the answers’s value when clicked button, let correct to be calculated at last. function checkAnswer() { choice = document.getElementsByName(“answerChoice”); var checkedAnswer = null; for (var i = 0; i < choice.length; i++) { if(choice[i].checked) { answers[pos] = choice[i].value; } } if( answers[pos] == … Read more