Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. Or a multi-dimensional associative array (not as complex as it sounds) $numbers = array( 'one' => array('var1' => 'blah 1', 'var2' => 'blah 2'), 'two' => array('var1' => 'blah 3', 'var2' => 'blah 4')); // will print blah 1 print $numbers['one']['var1']."<br />"; // will print blah 4 print $numbers['two']['var2']."<br />"; As the above post states you can add data to arrays within loops
  2. <!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>Test</title> <script type="text/javascript"> function formattel() { var element = document.getElementById("tel"); element.onkeypress = function() { var length = element.value.length; if(length == 9) { var reg = new RegExp("^[-]?[0-9]+[\.]?[0-9]+$"); if(reg.test(element.value)) { var tel = element.value; element.value = tel.substring(0,3)+"-"+tel.substring(3,6)+"-"+tel.substring(6,10); } } } } window.onload = function() { formattel(); } </script> </head> <body> Tel: <input type="text" name="tel" id="tel" maxlength="12" size="12" /> </body> </html>
  3. Why would you want to create variable variables from an array of data. The data can be accessed directly from the array; $numbers = array('one', 'two', 'three', 'four', 'five', 'six', 'seven'); // prints one print $numbers[0]."<br />"; // prints two print $numbers[1]; Or as PFMaBiSmAd has suggested use an associative array if you want to allocate data to custom keys. $numbers = array('one' => 'blah', 'two' => 'blah', 'three' => 'blah', 'four' => 'blah', 'five' => 'blah', 'six' => 'blah', 'seven' => 'blah'); foreach($numbers as $number => $value) { print $number.": ".$value."<br />"; }
  4. Haha, yeah, they claim to be experts at html/css and then when you ask them to do it they just export from photoshop/fireworks.... sigh. hmmmm, thats a bit lame for a web designer. I would class just having photoshop skills as graphic design. Our designer is able to work with XHTML, CSS, cross browser testing, image work, sometimes using jquery plugins to work with the DOM, bits of flash, macromedia creative suite of tools, and obviously photoshop. I would class those skills as web design. Any coding, server / client side is the developers area.
  5. What the above post states is the exact same process we follow and is really the general consensus with web design & development. 1. Agree a spec with client & brief suggestions on layout, theme, colours 2. Create mockup screenshots as images 3. Tweak until design is signed off by client 4. Designers convert the screenshots into (X)HTML and establish layout using CSS 5. Templates are passed over to developers to insert dynamic elements The designer should know what parts of the site are dynamic so they do not create a static template for every page that will exist on the site. Usually a blank template is created so a developer can re-use as and when. When the developer has completed testing they hand back to the designer to fix any issues with layout. I do not think you would get developers doing this. This is purely design work.
  6. Sorry, my bad. I thought that you had posted something about your company online and they were on to you. Like the above posts suggest, if you had and they had reason to suspect you, bet your bottom dollar they would take action. Loads of people have been sacked in the UK for putting crap on Facebook as harmless as, 'Im bored' in work time, not even offending anyone ,or comments resulting in loss to the company. Im just thinking why you would ask such a question? Are you planning on an online verbal rampage against someone? In the States someone will sue you for damages if you fart in an elevator next to them. Yes, i've seen that Judge Judy programme! I can't believe what people take to court in the US. They need to grow up. Sorry if you're a decent American citizen, no offence.
  7. You have just contradicted yourself. If you have posted bad comments on the Internet about your company in a moment of frustration then you are a silly boy. If they suspect it is you I would be worried no matter what the legal standing is.
  8. You didn't post your comments on Facebook did you?
  9. http://en.wikipedia.org/wiki/Rich_Internet_application http://en.wikipedia.org/wiki/List_of_rich_internet_application_frameworks You know, Google is amazing!
  10. Absolutely. You can do teacher training courses. http://www.tda.gov.uk/recruit.aspx You will need to do things like voluntary teaching, teachers assistant work, etc. There will be plenty of work throughout the UK in colleges, universities, sixth forms (maybe), where students will do web development as part of their qualification, HNC, HND, degree, etc. From what I have seen interviewing graduates for jobs, the stuff they did in web development i.e with PHP was way below par. We could do with some decent teachers in this subject.
  11. Have you tried the Firefox plugin? https://addons.mozilla.org/en-US/firefox/addon/7598/
  12. Google 'php xss vulnerability scan' XSS isn't the only thing you should be checking. You need to secure your forms using CAPTCHA to prevent bots using them and potentially sending email through them. Also shared servers are the worst to deal with for attacks. As they are shared, if another user of the server has a unsecure script it can lead to other users on the server suffering as files end up getting modified.
  13. The fact is, it is law that a company cannot create an unfair market domenence. MS effectively killed Netscape & others by shipping windows 95 with IE. I think you may see things differently if you were one of the smaller companies making browser software but I can see you have agrievance with the law. You can see the difference between MS & Google. In Google Chrome the user has the option to select a different search engine to use in the browser. They give the user the choice in a select list. If they had fixed it to Google then there would have been hell to play. When Microsoft released Windows 95 they gave no choice to the user who were not aware of any other web browser software. I don't know. Its a difficult subject and there are clearly 2 sides.
  14. Really, didn't know that
  15. You should really make the Javascript unobtrusive. i.e do not embed any scripts into your (X)HTML elements such as event handlers. Simple example. Normally you would put your javascript in an external file, however for simplicity <!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>Test</title> <script type="text/javascript"> window.onload = function() { submitform(); } function submitform() { if(!document.getElementById) return true; if(!document.getElementById("myform")) return true; if(!document.getElementById("submitbutton")) return true; var button = document.getElementById("submitbutton"); button.onclick = function() { var name = document.getElementById("name").value; if(name) { alert('Submitted form. Your name is '+name); } else { alert('Please enter your name'); } return false; } } </script> </head> <body> <form id="myform" method="post" action=""> Name: <input type="text" name="name" id="name" size="20" maxlength="20" /> <input type="submit" name="submit" value="submit" id="submitbutton" /> </form> </body> </html> If Javascript is disabled the form will still degrade gracefully. Yes the page will refresh but your server side code should handle this, validate the data and record it in the database.
  16. Have a look through the following tutorials. http://econym.org.uk/gmap/
  17. Not as likely as MS were forced to display a promt to all IE users that other browsers are available.
  18. Good points CV. No, but in the browser market they did play dirty. This is how they achieved their market domination. When users saw the Internet Explorer icon on their desktops they basically though that, "this is the internet". From recent events their market share is dropping and I would bet it will probably end up levelling out at 50/50 with IE users and everything else.
  19. fair point
  20. gonewest
  21. Because a lot of the major websites are beginning to drop support for it such as youtube, etc. To upgrade to IE7 / 8 doesn't require a new operating system. There are a few circumstances where organisations refuse to drop IE6 such as in the UK public sector. A lot of browser based systems work on legacy client side code that was built and tested on IE6. Upgrading the browser will effectively render these systems useless so basically the cost of rewriting these applications is an expense the government cannot afford. It's just another sad case of taxpayers money being wasted on crap. In all, IE6 should not be used by the average Jo. We tell all our clients that we are not supporting it, and if they use it they must upgrade. As Pikachu2000 says, "Shitcan it".
  22. What I don't get is why they haven't made it compatible with Windows XP. I must admit that I am the only person in our office that is still running XP purely because I can't be arsed with the hassle of setting up a new PC when this one works adequately. What it does mean though is that any client side code I write I will have to pester a colleague to borrow their PC to test in IE9. I find it hilarous. Microsoft: Here's our new super duper web browser, better, faster, more user-friendly than all others. Oh, by the way you can't use it on that operating system that we made a while ago, sorry. Why don't you spend more money on a licence for our latest operating system Windows 7 thats, better, faster, more user-friendly than all others! Suck my balls.
  23. Single handedly keeping the hooking business afloat during the recent recession, good job. LOL. He's paying my wages because I made & make most of the major websites for the escort industry! Keep it up!
  24. This is a subject that came to the front of my mind from recent things I have been working on, and would like others' thoughts & opinions. Basically my thought is regarding learning a framework prior to the core of a language. Hypothetically, using PHP as an example. If I was new to the language and was aware of the Zend Framework due to others talking about it, I could easily download and put it in a folder that my website can access. Now I want my website to display data from my database, so using the framework documentation I can see how to connect to my database, query it and display the data. $query = $db->query('SELECT * FROM users WHERE username = ? AND password = ?', array('foo', 'bar')); Now I want to validate some form fields so I read the documentation and I can use: if($element->isValid($_POST['value'])) { } Ok, so now I have studied the framework documentation, am familiar with the syntax and methods available for various tasks and use it in many of my projects. But, all the time using it I have never used any of the core functions within PHP. To me the frameworks' methods are the core. I have no idea what the code encapsulated within the frameworks' methods looks like or does. Do people see this as an issue? Lets say I get a job where I cannot use the framework. How the hell do I query a database? how do I write form validation functions? I would have to learn PHP's core functions. The above is hypothetical, however I recently (lets say the early part of the year) revived my usage of Javascript within projects. I always thought of JS as a hinderence to websites with the lack of a standard between browsers. Now, there are standards such as the DOM, etc which is much better for us developers. However, because of this, my knowledge of JS is now limited as many of the functions I once knew are now legacy. This lead me to adopt the jQuery framework for JS functionality as opposed to learning the standardised core functions. What is nagging at me is the fact that I can easily make something work with jQuery but only have a rough idea regarding the core functions in JS that are actually used in the jQuery method. If I was without jQuery I would struggle to re-create the same functionality using the programming language core. So, in essence do you believe that it is important for a developer to learn the core of a language prior to learning and using a framework?
×
×
  • 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.