Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: JS issue

  1. #11
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    No, Iszak.

    What I'm saying is, if you want effects and pre-built then go for Scriptaculous as I personally think their effects are better. Where as if you want a framework you can expand on I would go for jQuery as I think it's a better base to expand on than Prototype (of course, that's still my opinion).

  2. #12

    Default

    No, what I'm saying is that jQuery UI has effects and is pre-built much like Scriptaculous. jQuery UI has just as many effects with more on the way and infact jQuery has build in standard their slideUp and slideDown effects ontop of that an animation function for opacity, and your own personal style of effects and again fadeIn and fadeOut. So I don't know where you're getting that jQuery UI or jQuery doesn't have effects.

  3. #13
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I'm not saying jQuery doesn't have bloody effects.

    if you want effects and pre-built then go for Scriptaculous as I personally think their effects are better.
    I think if you don't know javascript then scriptaculous' effects are better and easier to use.

  4. #14

    Default

    Seriously what's so hard about.
    Code:
    $('#id').fadeIn('slow')
    As for prototype it's what? Even more so jQuery comes with that standard! No need to download another package like Scriptaculous. But of course if you want more than fade and slide, and animate effects you can always get jQuery UI, but if not saves bloating your code.

  5. #15
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Why are you argueing about it iszak? He said he finds it easier, I find it easier as often like I always say its a personal preference. There is no right or wrong using either as they pretty much have equal functionality. So leave it there.


    www.fragme.co = a project.

  6. #16
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I just think for the developer who has no preivous JS knowledge that

    Code:
    Effect.Pulsate( 'id' )
    is easier than

    Code:
        $("id").effect("pulsate", {} );
    or whatever the syntax is. Mainly because scriptaculous' is just plain english, where as in jQuery UI you need to know how to use element selectors or at leas the syntax for them.

  7. #17

    Default

    Use element selectors? It's CSS selectors, anyone who's doing jQuery surely would know HTML and CSS first, ahahaha - also nice point Matt.

  8. #18
    Join Date
    May 2007
    Posts
    467
    Tokens
    0

    Default

    Okay i want help with this is did not want **** about the diff libs out there okay an update this code here on click it will load and when its done loading it will just show the form again and not the message from the submit.php

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" language="javascript" src="js/prototype.js"></script>
    <script language="javascript" type="text/javascript">
    function submitForm()
    {
        var cont = $('box');
        name = document.getElementById("name").value;
        email = document.getElementById("email").value;
        message = document.getElementById("message").value;
        new Ajax.Request('submit.php',
        {
            parameters: {name: name, email: email, message: message},
            onSuccess: function(transport)
            {
                cont.innerHTML = transport.responseText;
            },
            onLoading: function()
            {
                cont.innerHTML = '<div align="center"><img src="images/loading.gif" alt="Loading" /><br />Sending message please hold!</div>';
            }
        });    
    }
    </script>
    </head>
    
    <body>
    <div id="box" align="center">
      <form method="post">
          Name:<br />
          <input type="text" name="name" id="name" />
          <br />
        Email:<br />
        <input type="text" name="email" id="email" />
        <br />
        Message:<br />
        <textarea name="message" id="message" cols="45" rows="5"></textarea>
        <br />
        <input type="submit" name="button" id="button" value="Send" onclick="javascript:submitForm();" />
      </form>
    </div>
    </body>
    </html>

  9. #19
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by VistaBoy View Post
    Okay i want help with this is did not want **** about the diff libs out there okay an update this code here on click it will load and when its done loading it will just show the form again and not the message from the submit.php
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" language="javascript" src="js/prototype.js"></script>
    <script language="javascript" type="text/javascript">
    function submitForm()
    {
        var cont = $('box');
        name = document.getElementById("name").value;
        email = document.getElementById("email").value;
        message = document.getElementById("message").value;
        new Ajax.Request('submit.php',
        {
            parameters: {name: name, email: email, message: message},
            onSuccess: function(transport)
            {
                document.getElementById("box").innerHTML = transport.responseText;
            },
            onLoading: function()
            {
                cont.innerHTML = '<div align="center"><img src="images/loading.gif" alt="Loading" /><br />Sending message please hold!</div>';
            }
        });    
    }
    </script>
    </head>
    
    <body>
    <div id="box" align="center">
      <form method="post">
          Name:<br />
          <input type="text" name="name" id="name" />
          <br />
        Email:<br />
        <input type="text" name="email" id="email" />
        <br />
        Message:<br />
        <textarea name="message" id="message" cols="45" rows="5"></textarea>
        <br />
        <input type="submit" name="button" id="button" value="Send" onclick="javascript:submitForm();" />
      </form>
    </div>
    </body>
    </html>

  10. #20
    Join Date
    May 2007
    Posts
    467
    Tokens
    0

    Default

    Nop did not work does the same thing does the loading then just shows the form.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •