Jump to content

JMRKER

Members
  • Content Count

    44
  • Joined

  • Last visited

  • Days Won

    1

JMRKER last won the day on June 23 2018

JMRKER had the most liked content!

Community Reputation

4 Neutral

About JMRKER

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. JMRKER

    Could you help me, please?

    Not sure I am understanding the question. The program appears to be doing exactly what you want. There are random quotes displayed in a panel below the button to be clicked. Appears to change when clicked. What actions do you want to be different?
  2. JMRKER

    Don't Print Buttons - How?

    Example of how it might be done. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> Screen / Print Displays </title> <style> @media only screen { body { color: green; } #prnButton { display: inline; } } @media only print { body { color: black; } #prnButton { display: none; } } </style> </head> <body> <h1>The @media Rule</h1> <p>Use mediaqueries to set the text color to green <br>when the document is displayed on the screen, and to black when it is printed.</p> <input id="prnButton" type='Button' value='Print' onclick='printpage()'> </body> <script> function printpage() { window.print(); // logic to print the page } </script> </html>
  3. JMRKER

    progress bar value

    It may be that the call to your progress display is only called when the AJAX call has been completed. After it received the completed data access, the function is not called upon again.
  4. JMRKER

    A drop down menu

    Can you provide an HTML example of the layout of the elements you are trying to include in your request? I'm unclear as to the requirements.
  5. JMRKER

    CSS Attribute-Selectors6

    There is no "$*" in the link you provided. In fact there is no code in the link you provided, just an image of some code. I like to program, but I don't like to type. You have mastered how to copy and paste a picture, now try with code usable code.
  6. JMRKER

    onclick disabled button

    I'm a bit tired of guessing what it is that you want. Your requirements are too vague for me. Log-on display is always available so what do you mean by replacing alert with figure?
  7. JMRKER

    onclick disabled button

    To which piece of code are you referring? That last requirement is totally new to the original post?
  8. JMRKER

    onclick disabled button

    Following is stripped down code to show proof of concept. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> HTML5 page </title> </head> <body> <!-- <label for="uname"><b>Username</b></label> <input type="text" id="uname" placeholder="Enter Username" name="uname" required><br/><br/> <label for="psw" ><b>Password</b></label> <input type="password" placeholder="Enter Password" id="psw" name="psw" required><br/><br/> --> <button onclick="login()" id="log">Login</button><br/><br/><br/> <button onclick="one()" id="fir">one</button> <button onclick="two()" id="sec">two</button> <button onclick="three()"id="thi">three</button> <button onclick="four()" id="for">four</button> <script> function one() { alert("first button"); } function two() { alert("second button"); } function three() { alert("third button"); } function four() { alert("fourth button"); } function threeOFF() { alert("third button turned OFF"); } function fourOFF() { alert("fourth button turned OFF"); } function login() { document.getElementById('thi').onclick = threeOFF; document.getElementById('thi').style.opacity = 0.4; document.getElementById('for').onclick = fourOFF; document.getElementById('for').style.opacity = 0.4; } </script> </body> </html> You could reconnect by changing the 'onclick' event back to the function 'three' instead off 'threeOFF'
  9. JMRKER

    onclick disabled button

    You could change the 'opacity' of the button to make it appear disabled. If you actually disable the button, then it will not react to any other events, such as onclick. You could modify the logic to use the functions 'addEventListener' and 'removeEventListener' to change the event actions and avoid the 'disable' altogether. For example, you could remove the original event assignments with 'removeEventListener' and then reference a new function to execute with 'addEventListener'. If you need to go to another user/password then you could reverse the assignments back to the original settings.
  10. JMRKER

    date format change

    Is this a change from your original request? Is the time expected to be the time of the date selection? If not, where is the time selection supposed to be collected from? What kind of time intervals - 0 to 23 hours? - any minutes/seconds required? Difficult for me to envision solution with current information provided. Sorry
  11. JMRKER

    date format change

    You can change the function called as a quick and dirty solution. function myFunction() { var x = document.getElementById("myDate").value.split('-'); document.getElementById("demo").innerHTML = x[1]+'/'+x[2]+'/'+x[0]; }
  12. JMRKER

    how make many id in one getElementById

    Yes, hence the reason for my comment: " 'dsonesuk's idea more dynamic with code changes ..."
  13. JMRKER

    login with tabs

    Removing radio button sections and adding drop-down was too easy. Why did you not try this yourself? Remainder of code remains the same as last post. You will still need to add the server-side submisison checks with password information as you seem to know how to do this already. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title> MARK tabs </title> <!-- From: http://w3schools.invisionzone.com/topic/58299-login-with-tabs/ Idea from: https://stackoverflow.com/questions/35564148/css-to-open-details-box-on-thumbnail-hover-or-click --> <style> #container { width: 100%; height: 30em; border: 1px solid blue; } main { width: 100%; height: 94%; border: 1px solid blue; ; } mark { margin: 0 0.25em; cursor: pointer; font-size: 1.5em; } mark:hover { background-color: lime; } .hide { display: none; } .orange { background-color: orange; } </style> </head> <body> <select id="users"> <option value=""> Select user </option> <option value="1"> User 1 </option> <option value="2"> User 2 </option> <option value="3"> User 3 </option> <option value="4"> User 4 </option> </select> <input type="password" id="password" value=""> <!-- Add <form> information for PHP submission --> <button onclick="checkUsers()"> Fake Submission </button> <ul id="instructions"> <li>Choose a 'User' above</li> <li> User #1 has access to first two tabs below </li> <li> User #2 has access to first four tabs below </li> <li> User #3 has access to first six tabs below </li> <li> User #4 has access to all eight tabs below </li> </ul> <div id="container"> <div id="selections"> <mark> Home </mark> <mark> Settings </mark> <mark> Changes </mark> <mark> Total </mark> <mark> Input </mark> <mark> Output </mark> <mark> Calibration </mark> <mark> Selftest </mark> </div> <main> <article> <h2> Home </h2> </article> <article> <h2> Settings </h2> </article> <article> <h2> Changes </h2> </article> <article> <h2> Total </h2> </article> <article> <h2> Input </h2> </article> <article> <h2> Output </h2> </article> <article> <h2> Calibration </h2> </article> <article> <h2> Selftest</h2> </article> </main> </div> <script> function show(info) { info.classList.remove('hide'); } // function showhide(info, act) { info.classList.toggle(act); } function hideAll() { var sel = document.querySelectorAll('#container article'); for (var i=0; i<sel.length; i++) { sel[i].classList.add('hide'); } return sel; } function unmarkAll() { var sel2 = document.querySelectorAll('#selections mark'); for (let i=0; i<sel2.length; i++) { sel2[i].classList.remove('orange'); } return sel2; } function checkUsers() { document.getElementById('instructions').classList.add('hide'); var vlu = Number(document.getElementById('users').value); var sel1 = hideAll(), sel2 = unmarkAll(); for (let i=0; i<sel2.length; i++) { // mouse click display effects if (i < (vlu*2)) { sel2[i].addEventListener('click', function() { hideAll(); show(sel1[i]); unmarkAll(); sel2[i].classList.add('orange'); } ); // tab marker } else { sel2[i].addEventListener('click', function() { hideAll(); unmarkAll(); } ); // tab marker } } } function init() { // initialize events and actions var sel1 = hideAll(); var sel2 = unmarkAll(); // for (let i=0; i<sel2.length; i++) { for (let i=0; i<0; i++) { // mouse click display effects sel2[i].addEventListener('click', function() { hideAll(); show(sel1[i]); unmarkAll(); sel2[i].classList.add('orange'); } ); // tab marker } } init(); </script> </body> </html>
  14. JMRKER

    how make many id in one getElementById

    'dsonesuk's idea more dynamic with code changes, but you could also do it old style in a pinch. <script> for (var i=1; i<=20; i++) { document.getElementById("Test"+i).value = Dotoff; } </script>
  15. JMRKER

    login with tabs

    Obviously I don't understand the requests. What parts are supposed to be tabs and what parts are to be user/password selections? Where do the drop down options come into play? I need a better explanation or example for me to try to help.
×