www.webdeveloper.com
Results 1 to 7 of 7

Thread: PHP or JavaScript?

  1. #1
    Join Date
    Feb 2012
    Posts
    264

    PHP or JavaScript?

    Hi,

    This is the best website I know: www.espaņaescultura.es
    The changing images on their homepage! Is that PHP (loop) or JavaScript? Is it very difficult to design that?

    asa

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,143
    Asa,

    They're using the jQuery Infinite Carousel plugin:
    http://sroucheray.org/blog/jquery-pl...nite-carousel/

  3. #3
    Join Date
    Feb 2012
    Posts
    264
    I don´t understand it! Do I have to use JavaScript with this plug-in? Im a starter, so might this be too difficult for me? And can I use this plug in on my Mac?

  4. #4
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,143
    It's a jQuery plugin (yes, it's JavaScript). My guess is that it's going to be too difficult for you. Your Mac has nothing to do with it.

  5. #5
    Join Date
    Feb 2012
    Posts
    264

    PHP or JavaScript?

    Ok, thanks!

  6. #6
    Join Date
    Jun 2012
    Posts
    1

    How do I execute a javascript function from php?

    I need to use php to determine whether or not to call the function and to pass it arguments. This is what I tried:
    php:
    echo "<Script language='javascript'>";
    echo "youwin(".count.");";
    echo "</Script>";

    The javascript function is:
    function youwin(num)
    {
    alert("You win!! You are the "+num+"th winner");
    return true;
    }

    For some reason the javascript function is not being executed. Any advice?
    Thanks!

    ____________
    Build Business Using Freelancers

  7. #7
    Join Date
    Mar 2011
    Posts
    65
    echo "<Script language='javascript'>";
    echo "youwin(".count.");";
    echo "</Script>";

    You're missing PHP's dollar sign for the variable? $count

    And have you included the javascript file or function in the surce code?

    If you're using FF, you have a menue option "web developer" -> "Error console".. load the page and see if you get any JS errors in there.

    For such stuff I can recommend the Web Developer Toolbar and Firebug.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles