Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    php string bold

    Is your mail being sent with a text/html content type header?
  2. You don't understand. All you're telling the user (whether or not he's a hacker) is that the data he sent doesn't fit the criteria you asked him for. What harm do you see in telling them a phone number can't have letters or that the username can't be longer than 50 characters? Having a form not work and not telling the users why it didn't is a good way to lose potential customers.
  3. jQuery has hasClass(), addClass() and removeClass() methods. In plain Javascript, you need to manipulate the .className property of the element. .className contains a space-separated list of classes that are applied to the element. You have to use string manipulation methods to find, add or remove classes from it.
  4. What are you passing to the $page variable? Is it a URL or a local file path?
  5. Ingolme

    Need help (solved)

    I hope you're familiar with CSS. If not, then read the CSS tutorial. You can use the border-left property on the paragraphs and list items. The distance of the blue line from the edge of the page can be changed by modifying the left margin.
  6. You should start your own thread for questions. AJAX is a Javascript technology that makes requests to the server. An AJAX request may load a PHP file, which will cause the PHP code to run.
  7. Ingolme

    for loop

    That is correct, but I can't see why you're using them like that in your code.
  8. Ingolme

    for loop

    Do you have any idea what the & and << operators do?
  9. Ingolme

    for loop

    The problem is that (i + j % 4) can be greater than 2, which is the highest index that a string with three characters can have. charCodeAt(0) will give the code for the first letter charCodeAt(1) will give the code for the second letter charCodeAt(2) will give the code for the third letter charCodeAt(3) will give NaN because there is no fourth letter
  10. Try putting the comma before the element instead of after, like this: <xsl:for-each select="Addresses/Address"> <xsl:for-each select="ancestor::ProtectionOrder/ProtectionOrderParties/ProtectionOrderParty/MNProtectionOrderPartyAdditional/ProtectedAddresses/Address[@InternalAddressID=current()/@InternalAddressID]"> <xsl:if test="AddressLine1"> <xsl:value-of select="AddressLine1"/> </xsl:if> <xsl:if test="AddressLine2"> <xsl:text>, </xsl:text> <xsl:value-of select="AddressLine2"/> </xsl:if> <xsl:if test="AddressLine3"> <xsl:text>, </xsl:text> <xsl:value-of select="AddressLine3"/> </xsl:if> <xsl:if test="AddressLine4"> <xsl:text>, </xsl:text> <xsl:value-of select="AddressLine4"/> </xsl:if> <xsl:text>; </xsl:text> </xsl:for-each></xsl:for-each>
  11. If the error is in validation of data sent by the user then you definitely need to inform the user about it, whether or not you think they're a hacker. The errors you don't show are parse and runtime errors of the code which may give a clue as to how the code works.
  12. Ingolme

    Table heads

    You could have a simple selector th { font-weight: normal;} But I'd recommend something more specific. Give your table a class or id attribute that's meaningful. For example, if the table is a schedule, give it a class "schedule" and then add that to the selector: .schedule th { font-weight: normal;}
  13. How is the user getting to page B? If it's a link, then you can pass the ID in the query string.
  14. Ingolme

    for loop

    The part of the loop you're putting in bold is the condition by which the loop decides whether it should continue or not. Any number that is not zero evaluates to true, so as long as i+1 is not zero, the loop will continue to run. The only reason I can see that somebody would put i + 1 there is if i starts off negative. Then, at some point, i will be equal to zero and the loop will stop. Read more about the for() loop here: http://www.w3schools.com/js/js_loop_for.asp
  15. It's his homework. His teacher asked him to use Prototype.js to create classes. I believe the very page he linked to describes how to do it better than I could. If that's not enough, he should check any resources his teacher gave him.
  16. Check the developer console and see what the AJAX request is returning.
  17. The variable searchTerm doesn't update automatically when the field changes. You need to assign document.getElementById("searchterm").value to it every time that you want to check the field's value.
  18. Ingolme

    sql

    PHP sends SQL queries to a MySQL server, so the MySQL server receives those queries and executes them. Can you link to the place where you read about this?
  19. I've never known PHP code to cause an internal server error. Usually that occurrs when you mess around with the .htaccess file.
  20. Ingolme

    for loop

    Your problem is that a is an array. You cannot add a number to an array When you write a = a + i, what are you expecting it to do? What's happening in your script is that it casts the array to a string "10,2" and then concatenates i, resulting in "10,20". On the second iteration, a.length is now the length of the string, which is 5. Now a = a + i results in the string "10,201" which has length 6. On the third iteration a becomes "10,2012", a string with length 7. And this continues on and on, because a.length keeps getting bigger and i never catches up with it.
  21. Ingolme

    best editor ?

    No. I have been working with web technologies for 10 years and never touched anything called "Azure". You cannot display a web page without HTML and CSS. You cannot manipulate data without a programming language such as PHP. That is why PHP, HTML and CSS are all necessary.
  22. I don't think you can call sort() on elems because it's not an array, it's a node list. Node lists are different than arrays in that they keep the order that the elements have in the DOM structure and they automatically update when an element is added or removed from the document. The id attribute cannot have a number as the first character, so your HTML wouldn't pass validation. Normally things like this are sorted using a server-side language before being added to the HTML code.
  23. Ingolme

    programming

    Yes. But I have no idea what you're really asking for. "reverse" has so many different meanings depending on the context.
×
×
  • Create New...