Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Posts posted by Q695

  1. Lets revert to the days of flash for an explanation:

    Remember how in flash you were able to go from frame 0 to frame 60 when you clicked on something, then it would stop.  then you could go from frame 60 to frame 120 (a copy of frame 0) on another click, then you could click it again to go back to frame 60 another time?  I'm having trouble mimicking something like that in JavaScript.

     

    The short problem is I'm trying to make a JavaScript flash tweener tied to an onClick button.

  2. It looks like they're taking the data from the text field/font field, and putting it over the image in the specific position with Javascript.

    This is an example of what they're doing:

    document.getElementById('test').innerHTML = volumeslider.value;
    
  3. What do you expect the code to do? What is the desired result?

    The code is to tack a show/hide screen onto either a web page that can show/hide the content of that tab (finished product).  you could also adapt it to a smart phone.  I just can't get the function calling to work for some reason.

     

    What do you get instead?

    The first function triggers, but not the 2nd one.

  4. What's wrong with this testing script (psudocode):

    function flippage() {
        var up, max, min, ;
    
        min = 0; //closed state closed state value
        max = 60; //maximum able to open
    
        if (typeof up === 'undefined') {
            up = min;
            // foo does not exist
        }
    
        //buggy code start
        if (up < max) {
            lower.onclick = increase;
        } else {
            lower.onclick = reduce;
        }
        //buggy code end
    
        function increase() {
    alert ("up is increased");
    up = max;
        }
    
            function reduce() {
    alert ("up is reduced");
    up = min;
            }
    }
    
            window.addEventListener("load", upward());
    
    

    I want it with the GT/LT operator.

  5. The JS for this would be something like:

    //http://www.tizag.com/javascriptT/javascript-innerHTML.php
        function whitespace() {
            var new_html=('#bubble').load('new_html');
    //        var new_html = document.getElementById('new_html').value;
            document.getElementById('bubble').innerHTML = new_html;
        }
    
    

    the menu would be like this:

    echo"<div align='left'>
        <ul>
            <li>menu      tester<ul>
                <li><a href='?'>Home</a></li>
                <li><a href='?'>Tools</a>
                    <ul>";
                    switch(isset($_SESSION['id'])){
                        case TRUE: echo"<li><a href id='new_html' onclick='whitespace()' value='?action=logout'>log out</a></li>"; break;
                        case FALSE: echo"<li><a href id='new_html' onclick='whitespace()' value='?action=login'>log in</a></li>"; break;
                    }
                        echo"
                        <li><a href id='new_html' onclick='whitespace()' value='?page=calendar'>calender</a></li>
                        <li><a href id='new_html' onclick='whitespace()' value='?page=batch_mailer'>batch mailer</a></li>
                        <li><a href id='new_html' onclick='whitespace()' value='?page=directory'>directory</a></li>
                    </ul>
                </li>
            </ul></li>
        </ul>
    </div>
    ";
    
  6. I was at a node.js (MNjs) meet up tonight, and the keynote speaker recommended doing a PJAX function to load the page, because I'm thinking a 1 page architecture with different pages that can be ran in, and out on an onclick..

     

     

    Do an ajax request to grab the HTML you want, then just stick it into the element with innerHTML. jQuery makes this easy with their .load method:

    $('#bubble').load('b.php');
    

    The above won't load the whole page at once?  I'll have to try the code.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.