Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. could be wrong here but maybe addslashes () could work
  2. dude it is js <script scr="mootools.js"></script> this means you include the mootools javascript into your page. its some extra javascript library to make javascript coding a lot easier. and no you dont install a thing since you dont have to install a thing to run javascript
  3. I use Wamp since I have to deal with actionscript and still make websites ie6 compatible (unfortunatly ) actually pretty much everything i need from adobe suchs photoshop illustrator etc. If apple wasnt so expensive or linux would run adobe software I wouldn't hesitate to switch to linux for a min. I prefer linux over windows its just some of software that doesn't run on it (or needs tweaking with emulators such as wine)
  4. Javascript gained great popularity over past years especially with ajax sites. How ever just as we have seen in the past with flash, its sometimes just totally useless and only gets used because its just so cool. Javascript is great if it serves a purpose which sometimes means making a site look a little bit cooler but mostly it should be used to improve users experience. When ever i start a new project creating a website i first make sure everything works with just plain php and html. after that i try to give it just extra touch with javascripting. as for saying javascript sucks... i mean c'mon thats just too childish that kinda makes me think of those people that says xbox is better then ps3 or something.
  5. I have to agree with jcombs_31. Mostly i program in oop style cos many classes i use pretty often such as logon classes and formvalidation. because i have them in classes it saved me tons of time creating new cms systems. But some stuff is simply easier to place as a function because you want to use it a lot and not just for one class. So pretty much keep in mind what you are going to build and if something will be usable in the future might as well spend a little more time on it now so you can re-use for future projects. but dont overdo it. php 5 has better oop support compared to php 4 but php != java. and lets keep it that way
  6. remove the absolute attribute and just add this before the footer <br style="clear:both" />
  7. this is php not html. just use a count variable that counts to 4 and then goes back to 0
  8. my code does work i tested it did you include the mootools script? <script src="mootools-release-1.11.js" language='javascript' type='text/javascript'></script> otherwise download it www.mootools.net or get it from the include (rename to js) [attachment deleted by admin]
  9. why does it have an onclick even why not use onhover instead
  10. php 5 has a great buildin class called simpleXML try looking that up
  11. yes you can just posted the same answer on the javascript section
  12. directy no... javascript cant read the server sessions but however you can simply make php echo javascript <script> var sessionData=<?php echo($_SESSION['your_session'])?>; </script>
  13. here is my add on to that. That previous script works except... the values dissapear once a new element gets inject. this one doesnt however it does use mootools <script src="mootools-release-1.11.js" language='javascript' type='text/javascript'></script> <script language='javascript' type='text/javascript'> function addField() { //get all input elements var inputElements=$('textfields').getChildren(); //clone the first element username var userInput=inputElements[0].clone(); userInput.value="";//if it had a value make it empty //clone the second element email var emailInput=inputElements[1].clone(); emailInput.value="";//if it had a value make it empty // get the last element lastElement=$('textfields').getLast(); //inject after the last element userInput.injectAfter(lastElement); // get the last element again lastElement=$('textfields').getLast(); //inject after the last element emailInput.injectAfter(lastElement); //still needs a break in the end var brElement=new Element('br'); // get the last element for the last time lastElement=$('textfields').getLast(); //put a break in it brElement.injectAfter(lastElement); } </script> </head> <body> <form name='theform' action='form.php' method='POST' > <div id='textfields'> <input type='text' name='username[]' /><input type='text' name='email[]' /><br /> </div> <input type='submit' name='submit' value='Submit' /> </form> <a href='javascript:addField()'>Add another user</a> </body> </html>
  14. ah i see i used javascript with photoshop a couple of times. i guess the only way is just paste the js sourse inside the script will have to do
  15. why not just put a redirect on box.php to profile.php or am i thinking to simple here? hmmm ???
  16. youre probably using ie for this. options cant be disabled in ie but can be in firefox . i would simply just not display them. whats the use of an option if you cant use it anyway. and where is the part about javascript its just php
  17. hmmm stdClass is part of php core. do you have the latest version of php installed?
  18. nope this is where you filter the array for emails and names first after you have done that then you create and sql query
  19. I think javascript would probably be more effective with php you will need a refresh everytime you swap a certain image. but if it is php since you are probably trying to order your gallery. I would add a position field for each image in your database. then each image on your php page you put in a hyperlink <a href="update_image_position.php?image_id=1"><image src="image.png" /></a> and on the update_image_position.php page you do a mysql update query and the redirect back to your gallery page
  20. Yikes... you sure you wanna do that cos thats an excellent why to break into a computer
  21. what do you mean confirm? a javascript confirm that popups saying "do you wish to insert the data" i dont really see the point in that I would just use php form validation
  22. if its gonna be a desktop application why not use PHP-GTK since you probably do have experience with php
  23. how about this one http://digitarald.de/project/fancyupload/2-0/showcase/photoqueue/
  24. its because the script doesnt see the test element yet the DOM hasnt fully loaded. if you would place it under the test element it should work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Edit Sales People - OFFICE</title> <link rel="stylesheet" type="text/css" href="../include/style.css"> </head> <body> <table> <tr> <td class="Light">Role</td> <td id="x">hello</td> </tr> </table> <script type="text/javascript"> document.getElementById("test").style.backgroundColor = "#FFFFCC"; </script> <div id="test">hellow</div> </body>
  25. maybe this line foreach ($_POST[i] as $value){ should be : foreach ($_POST[$i] as $value){ the i didnt had the $ character thus it wasnt a variable and therefor 0
×
×
  • 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.