Tech boy Posted January 17, 2012 Share Posted January 17, 2012 Hi I am in the process of teaching myself web development, coming from a vb and mssql background. I am building a small page that will display my film library, I just want something quick and simple that gets things working. I have three img tags on my page that display the film posters. The current film and the one previous and next. What I would like is a left and a right arrow that just scroll through the library. I am thinking I need to read the sub folder of D:\movies and story the full path name into an array, and then when the user presses a arrow it moves forward or back. Everything is local and I am unsure about how to handle the event of the left/arrow being pressed. Does PHP handle that kind of event or would Jquery be more suitable or something else completely?? thanks for any pointers. Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/ Share on other sites More sharing options...
KevinM1 Posted January 17, 2012 Share Posted January 17, 2012 PHP is server side only. Meaning, it can't 'see' what the client does (including mouse movements/clicks). It also has no native concept of events. Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308534 Share on other sites More sharing options...
AyKay47 Posted January 17, 2012 Share Posted January 17, 2012 Hi I am in the process of teaching myself web development, coming from a vb and mssql background. I am building a small page that will display my film library, I just want something quick and simple that gets things working. I have three img tags on my page that display the film posters. The current film and the one previous and next. What I would like is a left and a right arrow that just scroll through the library. I am thinking I need to read the sub folder of D:\movies and story the full path name into an array, and then when the user presses a arrow it moves forward or back. Everything is local and I am unsure about how to handle the event of the left/arrow being pressed. Does PHP handle that kind of event or would Jquery be more suitable or something else completely?? thanks for any pointers. a combination of both really, learning a new language should not be rushed, as this will lead to common errors that can be avoided, if you are serious about wanting to get into web development, take your time, learn the material the correct way, and then proceed with your script. Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308537 Share on other sites More sharing options...
Tech boy Posted January 18, 2012 Author Share Posted January 18, 2012 I was starting to think that PHP itself wasn't the complete answer!!! I will have a look at Jquery never looked at. I am working in dreamweaver cs4, but I didn't notice anything in their regarding Jquery. Does a plugin exist ?? thanks Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308800 Share on other sites More sharing options...
trq Posted January 18, 2012 Share Posted January 18, 2012 You can write JavaScript with any text area. Dreamweaver will just write bad code. Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308817 Share on other sites More sharing options...
Tech boy Posted January 18, 2012 Author Share Posted January 18, 2012 When you say bad code in dreamweaver could you please expand how do I right code code for Jquery?? so a little meat on the bones. Use php to search for my jpegs, and add the full path to an array in PHP. when the user clicks either arrow a jquery runs that will move the forward or back through the array. How does the image itself get updated? I feel that I am missing a step. thanks Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308819 Share on other sites More sharing options...
trq Posted January 18, 2012 Share Posted January 18, 2012 could you please expand how do I right code code for Jquery?? You learn JavaScript and then you learn about the extra functionality that jQuery provides. In fact, jQuery is so simple that allot of people skip learning JavaScript all together. Though I wouldn't recommend that approach in the long run, jQuery is pretty darn easy to get started with. See http://docs.jquery.com/Main_Page Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308821 Share on other sites More sharing options...
jotorres1 Posted January 18, 2012 Share Posted January 18, 2012 I could recommend my blog, which I explain basics of PHP, and also have a sample of jquery with ajax. Everything I write in those posts are things that I have learned and want to share with everyone. http://www.jotorres.com Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308901 Share on other sites More sharing options...
Drongo_III Posted January 18, 2012 Share Posted January 18, 2012 I would recommend getting to know ajax and specifically becoming more familiar with json - which will all help you connect client side actions with serverside processing. And yes - jquery has lots of good and simple functions for helping you do the above - so learn both Quote Link to comment https://forums.phpfreaks.com/topic/255217-php-or-jquery-or-should-i-use-something-else/#findComment-1308941 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.