php-general Digest 27 Mar 2011 20:40:24 -0000 Issue 7246
php-general Digest 27 Mar 2011 20:40:24 - Issue 7246 Topics (messages 312075 through 312075): Re: opening a new window from php script 312075 by: Richard Quadling Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On 26 March 2011 10:22, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2011-03-25 at 18:05 -0700, Tommy Pham wrote: On Fri, Mar 25, 2011 at 2:59 PM, Grega Leskovšek legr...@gmail.com wrote: I am working on CMS designed to those who are unfamiliar with a computer world and I want to offer a task where on a push of a button it will save current working page in textarea/s and open this page in a new tab or in a new window. PHP is server side. push of a button is client side. Google javascript+onClick. I googled some, but am still not sure how can I do it. Do I have to use target=_new - I can not do this - I am working this for my University seminar and it has to be valid HTML5. Please help me improve my plan 1. I check wheter the user is using windows, linux, mac and then show appropriate possibility of all browsers for the targeted platform (WIN:IE,SA,FF,CH,OP, LINUX:FF.CHROMIUM and I need help for the mac also besides SA and FF what does it have among browsers?) Have you tried to google for browser versions and platform? While searching for the same thing long time ago, I found a site that lists them. Also, note that since you'll be using onClick for push of a button, beware of Javascript version difference among the browsers. IIRC, IE is supports 1.3 and FF supports 1.9. Haven't tested the others so couldn't tell you. 2. When the browser clicks button with the image of browsers inside anchor I target _new and location of the current file ?1 How can I offer option to open a new window not a new tab? ?2 How can I avoid the target attribute? ?3 How can I make a click on an image to produce action - or what do You suggest me to use - I would prefer img element not button with an image - how can I do this? Once I will finish it I will offer here software to everybody so I will be able to get some response and improve it and this is one of the major problems otherwise it is already functional. Please help me, thanks in advance - or ? You think I could do this better in JS? -- When the sun rises I receive and when it sets I forgive - http://moj.skavt.net/gleskovs/ Always in Heart, Grega Leskovšek I don't know if you have Flash in your tool belt but have you considering using it? It may simply your life with various browsers and their versions across different platforms. Note: Flash does tend to be sluggish in terms of loading time and how much of what you need the Flash to do. Regards, Tommy I'd avoid trying to guess the browser entirely. There are always loads of fringe browsers that are in use, and things like Wine that allows people to run IE on Linux, as well as other Windows-based browsers too. As soon as you're trying to write a script that detects a specific browser and does something then you're already doing it wrong. Don't test for the browser, test for the feature that you're using. Javascript has a useful function called hasFeature which may help here. The main reason why it's bad to try and detect a browser and act on it is because you can get many browsers that work across a wide variety of operating systems such as Fx Opera, which vary from version to version and OS to OS. Thanks, Ash http://www.ashleysheridan.co.uk A common approach to web dev is to start with a dumb page - just HTML and then add CSS and JS. This is known as progressive enhancement. Another approach which I've read about recently is called regressive enhancement. Essentially, you start at the cutting edge, using the functionality that you want (canvas for example), and then add in the missing features. As more of the browsers that support the newer features become the popular ones, you end up with less code providing support for older browsers. So, when every browser supports canvas, you don't need to install any code to emulate the canvas. Modenizr and YepNope are the tools I read about for this. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY ---End Message---
Re: [PHP] opening a new window from php script
On 26 March 2011 10:22, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2011-03-25 at 18:05 -0700, Tommy Pham wrote: On Fri, Mar 25, 2011 at 2:59 PM, Grega Leskovšek legr...@gmail.com wrote: I am working on CMS designed to those who are unfamiliar with a computer world and I want to offer a task where on a push of a button it will save current working page in textarea/s and open this page in a new tab or in a new window. PHP is server side. push of a button is client side. Google javascript+onClick. I googled some, but am still not sure how can I do it. Do I have to use target=_new - I can not do this - I am working this for my University seminar and it has to be valid HTML5. Please help me improve my plan 1. I check wheter the user is using windows, linux, mac and then show appropriate possibility of all browsers for the targeted platform (WIN:IE,SA,FF,CH,OP, LINUX:FF.CHROMIUM and I need help for the mac also besides SA and FF what does it have among browsers?) Have you tried to google for browser versions and platform? While searching for the same thing long time ago, I found a site that lists them. Also, note that since you'll be using onClick for push of a button, beware of Javascript version difference among the browsers. IIRC, IE is supports 1.3 and FF supports 1.9. Haven't tested the others so couldn't tell you. 2. When the browser clicks button with the image of browsers inside anchor I target _new and location of the current file ?1 How can I offer option to open a new window not a new tab? ?2 How can I avoid the target attribute? ?3 How can I make a click on an image to produce action - or what do You suggest me to use - I would prefer img element not button with an image - how can I do this? Once I will finish it I will offer here software to everybody so I will be able to get some response and improve it and this is one of the major problems otherwise it is already functional. Please help me, thanks in advance - or ? You think I could do this better in JS? -- When the sun rises I receive and when it sets I forgive - http://moj.skavt.net/gleskovs/ Always in Heart, Grega Leskovšek I don't know if you have Flash in your tool belt but have you considering using it? It may simply your life with various browsers and their versions across different platforms. Note: Flash does tend to be sluggish in terms of loading time and how much of what you need the Flash to do. Regards, Tommy I'd avoid trying to guess the browser entirely. There are always loads of fringe browsers that are in use, and things like Wine that allows people to run IE on Linux, as well as other Windows-based browsers too. As soon as you're trying to write a script that detects a specific browser and does something then you're already doing it wrong. Don't test for the browser, test for the feature that you're using. Javascript has a useful function called hasFeature which may help here. The main reason why it's bad to try and detect a browser and act on it is because you can get many browsers that work across a wide variety of operating systems such as Fx Opera, which vary from version to version and OS to OS. Thanks, Ash http://www.ashleysheridan.co.uk A common approach to web dev is to start with a dumb page - just HTML and then add CSS and JS. This is known as progressive enhancement. Another approach which I've read about recently is called regressive enhancement. Essentially, you start at the cutting edge, using the functionality that you want (canvas for example), and then add in the missing features. As more of the browsers that support the newer features become the popular ones, you end up with less code providing support for older browsers. So, when every browser supports canvas, you don't need to install any code to emulate the canvas. Modenizr and YepNope are the tools I read about for this. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Permission Denied
Dear List - Thanks for all your help in the past. Here is another one... I am getting a Permission Denied message when I try to run a PHP script. I just changed the mode on the directory and the files to 777. This problem arose when I changed the permissions. I thought I was solving a problem, because I could not open a file for writing. I was not receiving error messages, but no file was created. Help and advice, please. Ethan Rosenberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is there any syntax to save a file in mysql?
in php i have a file to upload i want to save this file in a table and then retreive it from table in another situation is it possible?
Re: [PHP] Permission Denied
Do you have SELinux installed? 2011/3/28 Ethan Rosenberg eth...@earthlink.net: Dear List - Thanks for all your help in the past. Here is another one... I am getting a Permission Denied message when I try to run a PHP script. I just changed the mode on the directory and the files to 777. This problem arose when I changed the permissions. I thought I was solving a problem, because I could not open a file for writing. I was not receiving error messages, but no file was created. Help and advice, please. Ethan Rosenberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- ** Hans Åhlin Tel: +46761488019 icq: 275232967 http://www.kronan-net.com/ irc://irc.freenode.net:6667 - TheCoin ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there any syntax to save a file in mysql?
2011/3/28 Negin Nickparsa nickpa...@gmail.com: in php i have a file to upload i want to save this file in a table and then retreive it from table in another situation is it possible? I assume you are thinking of saving it in a MySQL table? If so read this http://dev.mysql.com/doc/refman/5.0/en/blob.html -- ** Hans Åhlin Tel: +46761488019 icq: 275232967 http://www.kronan-net.com/ irc://irc.freenode.net:6667 - TheCoin ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php