What I'm currently doing is using document.write
in my application to display search results to the user. However, I want these results to be shown in a table within <div class="main">
. The catch is that I don't want the table visible at the outset - only when displaying results. How can I achieve this? Appreciate your assistance! :)
https://jsfiddle.net/48prjb62/
HTML:
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css">
</script>
<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css'>
...
<p>CSS:</p>
<pre><code>html{
margin: 0;
padding: 0;
}
body{
margin: 0;
padding: 0;
}
.margin{
...
JS:
function phoneContract(brand, model, network, minutes, texts, data, upcost, monthlycost, length) {
...
}
var contract=[];
...
function checkBrand(){
...
}
function checkNetwork(){
...
}
var button = document.getElementById("search");
button.addEventListener("click", search, false);
var minutes
function slidefunction() {
...