Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. is the search field an input/textarea or is it another element. if the element is an input or textarea you can access the string length like this document.getElementById('searchField').value.length otherwise you can access it with innerHTML document.getElementById('searchField').innerHTML.length
  2. absofrigginlutely brilliant!
  3. if only that were true that would safe developers and designers a lot of pain up the butt
  4. I testing your code with the following <script type="text/javascript"> function surroundText(param1,param2){ alert(" param1: "+param1+" param2: "+param2); } </script> <a href="javascript:void(0);" onclick="surroundText('value1', 'value2'); return false;"><img style="border: none;" src="url.gif" alt="enterurl" /></a> this seems to work properly and doesnt produce any errors. so I'm guessing something is wrong with your function " surroundText"
  5. Why not use one js framework? JQuery has ajax functionality and prototype+ scriptaculous has animated accordion functionality. using two frameworks might be the problem and in the documentation of these frameworks they both state that using multi frameworks will most likely conflict with one another
  6. hmmm it seems like you allready solved it but anyhow for people in the future. its most likely you included the same file twice (compatibility.php) that or you declared the same function in different files. next time use [ url ] [ / url ] for links
  7. you don't need apache to run PHP it can also run on IIS. the problem probably is as you allready have noticed yourself . it is when you install PHP you should select the right server type. it has multiple IIS options i think not sure.
  8. thanks a bunge thats something i can work with
  9. thanks that nearly worked it still accepted 24:31 but i fixed that by changing the 4 into a 3 result <?php $pattern ="/(([0-1]{1}[0-9]{1})|([2]{1}[0-3]{1}))[0-5]{1}[0-9]{1})$/"; if (preg_match($pattern, $time_val)) { echo("valid string"); } ?> Other then having a solution i want to understand what it actually does. some things that are unclear to me 1. does the pipeline"|" in the patternt mean OR? 2. what does {1} mean in the pattern
  10. I never used regular expressions much since i didnt found the need to really use it and there were always other ways to achieve the samething without using it. however in a lot of cases its quite usefull. I'm trying to validate a string to see if it is a valid time. the string should allow "00:00" to "24:00" I have the following <?php $pattern ="/([0-2][0-9])+[0-5][0-9])$/"; if (preg_match($pattern, $time_val)) { echo("valid string"); } ?> this works buttttttttttttttttttttttt....... this also allows the value "99:00" the minutes i think i have but the hours is trickier how can fix it so it allows the numbers till 24?
  11. try using "onchange" instead of using onclick on every option <select onchange="run"> <option>1</option> <option>2</option> <option>3</option> </select>
  12. I am not a big fan of creating urls that only contain text using mod rewrite example www.someshop.com/hardware/computers/desktop.html instead of www.someshop.com/product_id=265 however some SEO companties claim that having no numbers in your url will lead to better results. is this really that true? I mean yeah one of the larger php sites wikipedia does exactly this. but this means you will have to do your queries text based instead of using number.
  13. perhaps this link will help you, http://en.wikipedia.org/wiki/Online_rich-text_editor there are more rich text editors out there just search for RTE or "rich text editor"
  14. i so wish MS would force an upgrade to IE7. I still make webpages IE6 since a lot of people use that crappy browser. But someday I will simply refuse to do this cos JS debugging is such a major pain in the butt for this one
  15. I'll give you a start <script> function showInput(){ //this is where you should build the input or make it visible } </script> <select onchange="showInput()"> <option>yes</option> <option>no</option> </select> you will still need to write the function but thats part of the fun
  16. I havent even thought about that. I think I'm gonna use this too
  17. Most modern browsers have the "ctrl +" (and IE "ctrl + mousescroll" I think ). Firefox 3 resizes most webpages quite nicely without screwing up the layout. wouldnt it be easier to use that? If it the website is specifically for seniors you might want to have the default size to be bigger rather then having a zoom option since its more important for them then the younger generation.
  18. if you want to upload images to a server it wouldnt be a applet but a servlet or just plain JSP. an applet can only run in the browser similar to javascript. the only thing i can imagine to use an applet for is for a progressbar
  19. what kind of dropdown menu are you looking for? do you have any example links?
  20. Uhm can you elaborate that? what do you mean with "yes in the dropdown"? do you mean a confirmbox maybe? What do you mean with "it will show an input field" do you mean you want a input field to be shown inside the form without submitting it?
  21. most definitly not your browser will never see a bit a php code since its processed on the server your javascript will be visible for the browser to read and this must always be either in the head or body section
  22. try looking at your source in your browser you should only see javascript and this will make tracking the error a lot easier.
  23. Dojo and YUI to add to that and I think scriptaculous is just the effects for prototype could be wrong though
  24. Yeah hackthissite.org a good one with the sql inject tutorials its even a lot of fun. I think if you tried them you will have better understanding of sql injections also it will prob teach you to build more secure php. hellboundhackers.org i never tried i think i will look into that one
  25. I used the joomla mysql database class and tweaked it so it supports sqlite,mysql and postgress. but there is no wrong or right in this. you prob can find some nice ones on phpclasses.org
×
×
  • 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.