JMRKER's Profile User Rating: -----

Reputation: 131 Stalwart
Group:
Contributors
Active Posts:
860 (0.36 per day)
Joined:
25-October 08
Profile Views:
10,791
Last Active:
User is online 41 minutes ago
Currently:
Viewing Topic: JavaScript/HTML code not working...

Previous Fields

Country:
US
OS Preference:
Who Cares
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
50

Latest Visitors

Icon   JMRKER has not set their status

Posts I've Made

  1. In Topic: Eliminate repetition when randomizing question stored in array

    Posted 22 May 2015

    Same idea presented in post #3.
  2. In Topic: Eliminate repetition when randomizing question stored in array

    Posted 21 May 2015

    Try not to cross-post on different forums.
    At least wait until you get no answers after a day or so.

    See: http://www.webdevelo...n-in-javascript


    Also looks like I got fooled into doing someone's homework.
  3. In Topic: Extremely new to code. Help on a very simple question

    Posted 14 May 2015

    Different approach that does not worry about any wrap around ...
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    
    <title> HTML5 page </title>
    
    <style type="text/css">
     b { font-size:1.5em; }
    </style>
    
    </head>
    <body>
    <pre id="debug"></pre>
    
    <script type="text/javascript">
    var alpha2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz';
    
    var str="hello";
    var num=0, chr='', str2='', strOffset=2;  // any number from 0 to 26
    
    for (var i=0; i<str.length; i++) {
      chr = str.charAt(i);
      num = alpha2.indexOf(chr)+strOffset;
      str2 += alpha2.charAt(num);
    }
    
    document.getElementById("debug").innerHTML = '<b>'+str + '</b> translates to: <b>'+str2+'</b>';
    </script>
    
    </body>
    </html>
    
  4. In Topic: Image Change Based on Day/Time

    Posted 10 May 2015

    View Postdingodoo, on 10 May 2015 - 03:42 AM, said:

    I am interested in this script but do you or anyone else have it so it displays different times/images 7 days a week, so each day is different.


    Perhaps the last posted entry solved your problems,
    but if not then I would have more questions to modify my entry.

    How many pictures total do you wish to display? 1 for each day (7) plus a "No show available" image?
    How many hours to cover? 8, 12, 24 or something else? Same hours for each day?
    Non-hourly times, for example 9:30am to 11:30am? Which images go with which day/time combination?

    Lots of possibilities, but since I'm not much of a mind reader,
    I'll wait for a response before putting in too much work.
  5. In Topic: how do I create a strike through in an array when the word is clicked

    Posted 5 May 2015

    Just playing around with a goofy demonstration of various options
    to make sure I understand the underlying concepts: :bananaman:/>

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <title> CSS Toggler Test </title>
    <style type="text/css">
     .toggler { float:left; width:200px; cursor:pointer; border:1px solid green; }
    </style>
    
    </head>
    <body>
    
    <ul id="wordsearchlist1a" class="toggler"> Overline
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist1b" class="toggler"> Strike-through
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist1c" class="toggler"> Underline
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist1d" class="toggler"> Sequence lines
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <br style="clear:both">
    
    <ul id="wordsearchlist2a" class="toggler"> Foreground color
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist2b" class="toggler"> Sequence colors
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist2c" class="toggler"> Background color
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist2d" class="toggler"> Sequence Background
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <br style="clear:both">
    
    <ul id="wordsearchlist3" class="toggler"> Italics
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist4" class="toggler"> Font weight
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="wordsearchlist5" class="toggler"> Font size
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <br style="clear:both">
    
    <ul id="wordsearchlist6" class="toggler"> Text Alignment
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
    </ul>
    
    <ul id="worklink" class="toggler"> Does nothing
        <li>Link 1</li>
        <li>Link 2</li>
        <li>Link 3</li>
    </ul>
    
    <script type="text/javascript">
    // Modified from post #10:
    // http://www.dreamincode.net/forums/topic/375381-how-do-i-create-a-strike-through-in-an-array-when-the-word-is-clicked/page__gopid__2150011&#entry2150011
    
    function checkWords(ulId, toggle, propName){ 
        var itemApply = function(e) {
            var state = 0;
            var setCurrent = function() { e.style.setProperty(propName, toggle[state]); };
            var nextState = function() { state = (state + 1) % toggle.length; setCurrent(); };
            setCurrent();
            e.onclick = nextState;
        };
        var xs = document.querySelectorAll("#" + ulId + " li");  // NOTE: may need workaround with other elements; ie: div,span,select,etc.
        for(var i=0; i<xs.length; i++) { itemApply(xs[i]); }
    }
    
    window.onload = function () { 
        checkWords("wordsearchlist1a", [ "none", "overline" ],     "text-decoration"); 
        checkWords("wordsearchlist1b", [ "none", "line-through" ], "text-decoration"); 
        checkWords("wordsearchlist1c", [ "none", "underline" ],    "text-decoration"); 
        checkWords("wordsearchlist1d", [ "none","underline","line-through","overline" ], "text-decoration"); 
    
        checkWords("wordsearchlist2a", [ "blue", "red" ],          "color"); 
        checkWords("wordsearchlist2b", [ "blue","red","green","black" ], "color"); 
        checkWords("wordsearchlist2c", [ "", "red" ],              "background-color"); 
        checkWords("wordsearchlist2d", [ "","orange","red","lime","cyan" ], "background-color"); 
    
        checkWords("wordsearchlist3",  [ "normal", "italic" ],     "font-style"); 
        checkWords("wordsearchlist4",  [ "normal", "bold" ],       "font-weight"); 
        checkWords("wordsearchlist5",  [ "1em", "1.5em" ],         "font-size"); 
        checkWords("wordsearchlist6",  [ "left", "right" ],        "text-align"); 
    };   
    </script>
    
    </body>
    </html>
    

My Information

Member Title:
D.I.C Addict
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Florida
Programming Languages:
javascript, perl, java, forth, basic, fortran, assembly (several)

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Friends

Showing 50 random friends of 4

Comments

JMRKER has no profile comments yet. Why not say hello?