Jump to content

Lautarox

Members
  • Posts

    132
  • Joined

  • Last visited

    Never

Everything posted by Lautarox

  1. Yes, I understand, but It will work fine as a way to learn RegEx. Will an HTML parser be faster?
  2. Thanks, I'll use preg_match instead. The ([^"]+) means all the characters inside exept " right? thanks for answering
  3. Thanks for your answer. I'm actually trying to get from: <form id="login_form" action="webpage.php"><input... , using: $pattern = '~id=\"login_form\" action=\"(.+)\">~'; preg_match_all($pattern, $subject, $matches); I'm getting the page but also all the code that follows it. What am I doing wrong? Thanks in advance.
  4. I'm trying to get the html code of a page, for example, action="pageinside" name="id"> I want to get the /page.php inside the " ", but I'm getting messed up when I try to comment the spcecial characters. It would be nice to see how it is commented, if someone can provide me with an example, it would be great.
  5. You are right, you can check the month also, the problem is that you want the voters to be able to vote once the day has finished, the only way to do this is to check if its the next day, you can also add the month and the year, it won't be too much, just some ifs
  6. Well.., you can get the day number by using date(); an comparing the one you saved into the database using date too.
  7. Yes, if you do this in separated pages it woul work. There's no need of javascript for what you are saying, just a form that will be submitted each time you click the submit button and it will be checked in the next page if what was inputted was correctly. (You don't need javascript unless you want to make something else than a submit button to change pages). It will be like a normal form.
  8. I was coding a dynamic javascript script, and realised that when I was triying to load some questions from the database I got some unexpected characters: var preguntas = new Array("¿Como me llamo?", "¿Donde vivo?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?", "¿En que barrio?"); Why is the  character beeing printed? I inserted the row using phpMyAdmin Thanks in advance
  9. This is really strange, have a look at this output: Trying to go to the next page from page: 1 to 2 Starting to save content from actual page: 1 Actual value: 0 - elecciones[0] = (1) - elementSelected[0] = (opcion1-1) Actual value: 1 - elecciones[1] = (1) - elementSelected[1] = (opcion2-1) Actual value: 2 - elecciones[2] = (1) - elementSelected[2] = (opcion3-1) Actual value: 3 - elecciones[3] = (1) - elementSelected[3] = (opcion4-1) And then, when triying to load it again: Starting to put content from page 1 actualValue=0 elementSelected[0] = opcion1-1 opciones[0][0] = cacona opciones[0][1] = caconudo opciones[0][2] = caca opciones[0][3] = weopo actualValue=1 elementSelected[1] = opcion2-1 opciones[1][0] = cacona opciones[1][1] = caca opciones[1][2] = weopoweopo opciones[1][3] = caconudo actualValue=2 elementSelected[2] = opcion3-1 opciones[2][0] = caca opciones[2][1] = weopo opciones[2][2] = cacona opciones[2][3] = caconudo actualValue=3 elementSelected[3] = [object Object] And it starts looping pages, something really strange. I don't know wht its value it's an object..
  10. You could submit the form using ajax and get a response to use it on your page without need of reloading the hole page, serialize will output something like inputname=inputvalue&inputname2=inputvalue2 ... pefect to use when using an ajax request in php or get, as you wish. You can perfom an ajax request using the ajax function, http://api.jquery.com/jQuery.ajax/ Taken from the jquery api doc: $.ajax({ type: "POST", // you can use POST or GET method depending on how you will be using the vars on php url: "some.php", // the url to perform the ajax request data: "name=John&location=Boston", // the data, as serialize outputs the form data like that, you can use the data outputed by serializing your form success: function(msg){ // what to do with the php output alert( "Data Saved: " + msg ); } }); In php, you can use the vars, if using post, with $_POST['inputname'] and each one will output the input value
  11. Here's a good tutorial about this, http://imar.spaanjaars.com/312/how-do-i-make-a-full-table-row-clickable
  12. <script> $("#box-login").show('shake', 55); $(".header-login").show('shake', 55); $("#content-login .error").show('blind', 500); return false; </script> Should work. You could also use the .ready() function to load that when the body is loaded.
  13. If you need to work with real time updates of the database, you should read about javascript and ajax
  14. Are you declaring that function in a class?
  15. brianlange, I think that what he wants it's to perfom the form submission after 5 seconds of clicking a button, make clear that you are using jquery to not confuse sphinix.
  16. Is it possible for you to use firebug? in console mode it will output any errors you have on javascript.
  17. You can check this page http://www.erummunir.com/240/clear-text-on-input-field-on-click
  18. You might have to work with the size of the div with css. You could modify the pagination class, but the wrapping may work, try giving it a size.
  19. If understood what you are saying, jquery has a lot of effects to hide or show html elements, you can check jquery ui also.
  20. If you take a look to the code, var e = document.createElement('a'); e.setAttribute('href',self.location); e.setAttribute('title',document.title); e.setAttribute('rel','sidebar'); It is creating an "a" element, an anchor element and giving some attributes to it, you should read about creating other elements such images and giving attributes to it, you can check http://www.w3schools.com/js/default.asp
  21. Take a look here http://www.devarticles.com/c/a/JavaScript/Working-with-IFRAME-in-JavaScript/
  22. Have you outputted the userdata var to see what's inside before and after adding the text?
  23. As Crayon Violent says, javascript is only executed on the browser, but you can output a javascript confirmation box as any other html content. You can create another php page to handle the the confirmation, but you can't start loading the php code and in a certain time stop it to ask for something, it loads, outputs and finishes.
  24. You need to make a function that will be called when the button is clicked, for the 5 seconds you need to be waited, you can check here http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm, for the button name, you can change it using the .value property and for disabling the button you can check here http://www.codetoad.com/javascript/enable_disable_form_element.asp, I recommend you to read about javascript.
  25. Thanks a lot for answering, I have a live page to show you, http://fbapplications.com.ar/test.html , I've made a lot of loggin so you can check what's going on easily
×
×
  • 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.