Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Posts posted by RichardRotterdam

  1. Take a look at the functions setInterval() and setTimeout(). You could use one of those to do what you're describing. Along that you need to fetch each tr element which should be easy enough with jQuery

  2. This seems to indicate your using jquery is that true?

    $(the div).attr('width')

     

    And are you litterly using the div as selector or are you just using that as an example?

     

    Another question which puzzles me is why would you want to have a textarea that is larger over a div element? I have my doubts if that might be a good idea, can you perhaps elaborate why you would want this?

  3. I'm trying to remove index.php from my urls.  I have two applications, one called "main"(uses main.php) the other called "admin"(uses admin.php).

     

    Probably not what you want to hear but here goes. Your saying you're using main.php and admin.php? Where are those files? Are those in /public/main.php and /public/admin.php or in /app/controllers/main.php and /app/controller/index.php? Or maybe somewhere else.

     

    Also did you look into the manual under Routing? Also the manual descibes how to remove the index.php from the url http://codeigniter.com/user_guide/general/urls.html

  4. I did explain why that doesn't work in the first post and how to make that work. If you want the function to work that way you will need to a synchronous, rather than

    asynchronous call. But I can't show you how to do that because the function ajax.get isn't shown in your post.

     

    The thing that's unclear is why you want the value to be returned? What do you need to do with that data that's retrieved using an ajax call?

     

  5. You could do that. This is how it works the ajax request is done and starts waiting for a response. However the javascript is being run directly after the request and it's not waiting for the response to continue.

     

    You can either use a callback function to run within the ananymous function inside get() or you could do synchronous(by setting async:false) call which locks up the whole javascript execution untill you get a response.

     

    I'd go for the callback.

  6. There are 2 ways to approach that problem.

    1. Use the iframe mode of your lightbox plugin which would make the content of the lightbox pretty much like it's own page.

    2. use the non iframe mode of your lightbox plugin.

     

    Could you show some code it's not really clear what your trying to do on functional level which could help people here to send you in the right direction.

  7. Scripts

    scripts/jqFancyTransitions.1.8.min.js

    scripts/jquery.cycle.all.2.72.js

     

    Ok that makes it a little clearer.

    The above script names do not seem to be the jQuery library but plugins written to work with the jQuery library.  So your problem is most likely has nothing todo with jQuery but with the plugins.

     

    Still it's unclear what the problem is with those scripts. Does IE9 give you any javascript errors?

     

  8. Your code:

    function checkplan() {
        if (document.step1.plan[0].checked == true) {
            $(document).ready(function () {
    
                $("#alert_button").submit(function () {
                    jAlert('This is a custom ', 'Alert Dialog');
                    return false;
                });
            });
        }
    }
    

     

    as Omirion said it's a bit pointless to do a domready check inside the function the other way around would be more logical like so:

    $(document).ready() {
        // your function call here
        checkplan();
    }
    

     

    If I may ask what is this suppose to do?

    document.step1.plan[0].checked == true
    

    I'm pretty sure you could write it neater using the jQuery selector.

     

    You might also want to take a look at jquery ui

  9. Check if you see any javascript errors. If the error reporting of of IE 9 isn't enough give firebug lite a go. I somehow doubt it's a js thing it usually isn't with jQuery it usually is a CSS thing like an attribute that is unknown or behaving differently. Also what version of jQuery are you using?

  10. You could use document.getElementsByTagName

     

    Here is an example read the comments to understand how it works:

     

    <script>
    window.onload = function() {
        // get input elements
        var inputElements = document.getElementsByTagName('input');
        // loop through input elements
        for(var i = 0; i < inputElements.length; i++) {
            // output the value of each element use alert if you're not using firebug
            console.log(inputElements[i]['value']);
        }
    }
    </script>
    
    <input type="text" value="" name="txt1" />
    <input type="text" value="not empty" name="txt2" />
    <input type="text" value="" name="txt3" />
    <input type="text" value="not empty either" name="txt4" />
    

  11. Removing a textarea element is not a matter of simply modifying  that code you pasted. You need new functionality to accomplish what you are describing. You could add a new delete button with the textarea you create and add a delete event for the textarea element next to it.

×
×
  • 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.