Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. I think the PHP implementation of AppML requires a database.
  2. There should not be a space between the variable and square brackets in this code fragment: $pays [$resultcount-1]['price'] Have you checked the value of $color to see what is in it?
  3. According to this page, there is an appml_config.php file and they have instructions on how to create it: http://www.w3schools.com/appml/appml_php.asp
  4. In one place you're using the variable $colour and in another you're using the variable $color
  5. You should use entities to substitute the angle brackets in your code <textarea rows="3" cols="20"><a href="http://www.rebeckahstreasures.com/blog/categories/saturday-link-party" target="_blank"><img src="http://www.weebly.com/uploads/1/4/3/9/14399682/21012_orig.jpg" border="0" width="200" /></a></textarea>
  6. The getElementById() method returns an object of type HTMLElement. That object has a set of properties and methods of its own. Here is a list of them: http://www.w3schools.com/jsref/dom_obj_all.asp
  7. If the image is the background of the button, you can put text in front of it. You will need CSS for that. Here are the basics: HTML: <a href="index.html" class="button">Home</a> CSS: a.button { /* Not using shorthand background property just for illustration */ background-image: url(button.jpg); background position: top left; background-repeat: no-repeat; display: inline-block; /* Allows me to specify a height for the button */ width: 100px; /* Width of button image */ height: 60px; /* Height of button image */ line-height: 60px; /* Line height same as height so that the text will be vertically centered */ text-align: center;} If you haven't learnt CSS yet, be sure to check out the W3Schools.com CSS tutorial.
  8. For cross-origin requests your server needs to send an "Access-Control-Allow-Origin" HTTP header. More details here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
  9. Can you describe in detail what is happening and what you wanted it to do?
  10. You should read the AJAX tutorial again. You need an event handler for the readystatechange event, the response will be available only when that function runs and the ready state is 4 or 5
  11. If you're able to access localhost then you already have server software. It doesn't matter whether it's apache or not. Wherever "/exist/rest/db/apps/HTML_Student/Database_Example.xq" is, you need to put the HTML file there too. Inside the directory that's a parent of /exist
  12. onpaste is not a standard event. W3Schools is not the W3C, they're two completely independent organizations. Here's the MDN page about it: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/onpaste
  13. I don't really know what a "hexadecimal" file is. Perhaps it's base-64 encoded? If it's an image, you can't turn it into a text file because the data is binary.
  14. For MySQL to work, the date needs to be in the format YYYY-MM-DD Your query is open to MySQL injection, you should check the W3Schools.com tutorials to learn about prepared statements: http://www.w3schools.com/php/php_mysql_prepared_statements.asp
  15. No, your Javascript just has to be loaded from the same server. Just upload your HTML page to the server and run it from there.
  16. You need to learn a server-side programming language. PHP is very common and Wordpress is built upon it. W3Schools has a PHP tutorial. You will also need to learn MySQL to interact with a database. If all you know is HTML, this is going to be a very big leap in complexity from what you're used to. Bootstrap's pagination is just to change the appearance of pagination buttons, it doesn't actually do the pagination for you.
  17. Cross-Origin requests are HTTP requests done from one domain to another. In order for your code to work, the Javascript has to be loaded from the same server the file you're requesting is on. That means you can't just double-click the HTML file to test it, you need to type http://localhost:8080/path/to/file.php in your browser so that the Javascript is originating from the same domain as the xquery code.
  18. How are you sending the e-mails in the first place?
  19. "mysqli" should all be lower case. $conn = new MySQLi($servername, $username, $password, $dbname); You only have type identifiers for three variables, but you're binding five: $stmt->bind_param("sss", $firstname, $lastname, $loginid, $email, $password); The only way this code could be running without errors is if you have error reporting disabled.
  20. As far as I know, they are not officially recognized by any organization. The W3Schools staff seem to try to make it really difficult to find contact information. I believe the address for certificate questions used to be exam@w3schools.com
  21. This works: var reg = /firstnamed{2,4}lastname/i The main problem is probably that you have to escape the backslash since it's inside a string. If you make a literal regular expression you won't encounter that problem. In simpler terms, if it's between quotation marks, d needs to be d
  22. If the table name isn't specified, you can't run the query. You're not supposed to, it won't work.
  23. The problem is that you're running the script only if $_POST['kolom2'] does not exist. It should be the other way around: if(isset($_POST['kolom2']) { $tab = $_POST['kolom2']; // Run a database query}
  24. You should add a purely numeric field in the database table by which to order these which gets determined as you insert the data into the database. What does your table structure look like?
  25. No, don't ditch it. That style is fine because the object is not being destroyed when the function ends. This is an example that would be a problem with the garbage collector: function doSomething(a, { var position = { x: a, y: b }; position.x++; position.y++; return [position.x, position.y];} The function is creating an object position in the function which is immediately destroyed when the function ends. Then it's returning an array whose value will be used and then the array will be destroyed too, so that's two things for the garbage collector to pick up every time the function runs. In your JSFiddle example I don't see anything in particular that would make the garbage collector do a lot of work. The only thing I see there is Date.now(). I'm not entirely sure if internally it generates a Date object or not but it probably doesn't. If the problem is only happening on your actual page then you should look at some of the code that's not in the JSFiddle example.
×
×
  • Create New...