Jump to content

JMRKER

Members
  • Content count

    14
  • Joined

  • Last visited

  • Days Won

    1

JMRKER last won the day on June 23

JMRKER had the most liked content!

Community Reputation

2 Neutral

About JMRKER

  • Rank
    Newbie
  1. JMRKER

    Button counter save

    Sorry, I understood your suggestion. I have used it in the past as well. What I was asking the OP for was clarification as to how the count request was to be used. Server (your solution) or client side (via local storage).
  2. JMRKER

    Button counter save

    Unclear on the request, so for clarification: Does the button count need to be stored on the server for counts from more than one user? Or, can the button count be saved (and/or reset) with local storage on the users single computer?
  3. JMRKER

    html columns

    You can simplify it even further ... <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> <style> .columnList2 { -webkit-column-count: 2; /* Chrome, Safari, Opera */ -moz-column-count: 2; /* Firefox */ column-count: 2; } ul { list-style: none; } </style> </head> <body> <ul class="columnList2"> <li>Mr. Smith</li> <li>123 Main</li> <li>Somewhere, CA 12345</li> <li>Ms. Baker</li> <li>456 Central</li> <li>Other City, FL 32165</li> </ul> </body> </html>
  4. JMRKER

    html columns

    Not sure how your data is formatted, but using JSON format as an example. You could modify the following to suit your needs (???). <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> <!--For: http://w3schools.invisionzone.com/topic/58061-html-columns/ --> <style> #customersInfo { width: 30em; border: 1px solid red; } #customersInfo > input { width: 15em; border: 0; background-color: yellow; margin: 0.5em; } </style> </head> <body> <p> Starting text </p> <fieldset id="customersInfo"> <legend for="customersInfo">Customers Information</legend> <input id="name0" value=""> <input id="name1" value=""> <br> <input id="addr0" value=""> <input id="addr1" value=""> <br> <input id="csz0" value=""> <input id="csz1" value=""> </fieldset> <p> More text </p> <script> var customers = [ {"name":"Mr. Smith", "addr":"123 Main", "city":"Somewhere", "st":"CA", "zip":"12345"}, {"name":"Ms Baker", "addr":"456 Central", "city":"Other City", "st":"FL", "zip":"32165"} ]; function doc(IDS) { return document.getElementById(IDS); } function init() { for (var i=0; i<customers.length; i++) { doc('name'+i).value = customers[i].name; doc('addr'+i).value = customers[i].addr; doc('csz'+i).value = customers[i].city+', '+customers[i].st+' '+customers[i].zip; } } init(); </script> </body> </html>
  5. JMRKER

    few checkbox checked, but count as one

    Well, I'm glad it solved your problems, but I don't know how it did. Can you give an example of the HTML layout with 3 groups of 3 checkbox and show how clicking on 2 and 1 and 2 in each of the groups (A,B,C) makes a total of 9 checked boxes?
  6. JMRKER

    few checkbox checked, but count as one

    Sure, why not? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> <!-- link rel="stylesheet" href="common.css" media="screen" --> <style> fieldset { width: 10em; } </style> </head> <body> <fieldset id="GC"> <legend>Group Count</legend> <input type="checkbox" value="4"> 2<sup>2</sup> <input type="checkbox" value="2"> 2<sup>1</sup> <input type="checkbox" value="1"> 2<sup>0</sup> </fieldset> <input type="button" value="Submit Group Count" id="submit"> <script> function summate() { var sel = document.getElementById('GC').querySelectorAll('input'), sum = 0; for (var i=0; i<sel.length; i++) { if (sel[i].checked) { sum += Number(sel[i].value); } } // return sum; alert('Sum: '+sum); } function init() { document.getElementById('submit').addEventListener('click',summate); } init(); </script> </body> </html>
  7. JMRKER

    Adding and Deleting

    I pointed out one error. Have you tested the program since? Are you experiencing additional problems? Is your project performing as expected?
  8. JMRKER

    Adding and Deleting

    Don't know if there is a problem with your code as I don't see any questions. However, in your first four functions you define "blok" as a local variable in 3 of them and a global in the other. function verwijderLijn(demo) { blok = document.getElementById(demo); lijnen = blok.getElementsByTagName("hr"); if (lijnen.length > 0) { blok.removeChild(lijnen[lijnen.length - 1]); } } Was that intentional?
  9. JMRKER

    Testing a radio button ON or OFF?

    Then why not ask in the PHP forum?
  10. JMRKER

    Testing a radio button ON or OFF?

    What language are you trying to write with? Java or Javascript? There is not a native "print" function in Javascript. If the code is Java, then you would get better answers in that forum.
  11. JMRKER

    Default should Hide and Click should Display

    As 'dsonesuk' says, have you tried this ... <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> <style> .hide { display: none; } </style> </head> <body> <button onclick="myFunction('myDIV')">Click Me</button> <div id="myDIV" class="hide"> This is my DIV element. </div> <script> function myFunction(info) { document.getElementById(info).classList.toggle('hide'); } </script> </body> </html>
  12. JMRKER

    charset

    Are you asking about this: https://www.w3schools.com/jsref/jsref_encodeURI.asp
  13. JMRKER

    How To put Button into Tabs

    Unclear of the desired results. Can you expand on your design requirements? Perhaps a picture of what you are trying to accomplish? Or what is supposed to happen when a particular button is clicked?
  14. JMRKER

    Changing the place of input and label

    Have you tried this? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> </head> <body> <div class="form-group"> <label class="col-sm-4 control-label">Checkbox inputs</label> <div class="col-sm-8"> <div class="checkbox check-transparent"> <label for="opt01">Option 1</label> <input type="checkbox" value="1" id="opt01" checked> </div> <div class="checkbox check-transparent"> <label for="opt02">Option 2</label> <input type="checkbox" value="1" id="opt02"> </div> <div class="checkbox check-transparent"> <label for="opt03">Option 3</label> <input type="checkbox" value="1" id="opt03"> </div> </div> <div> </body> </html>
×