-
Posts
14,901 -
Joined
-
Last visited
-
Days Won
177
Content Type
Profiles
Forums
Events
Everything posted by Ingolme
-
Is your mail being sent with a text/html content type header?
-
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.
-
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.
- 14 replies
-
- javascript
- css
-
(and 1 more)
Tagged with:
-
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.
-
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.
-
That is correct, but I can't see why you're using them like that in your code.
-
Do you have any idea what the & and << operators do?
-
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
-
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>
-
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.
-
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;}
-
You should show us what the code for showHint() is.
-
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
-
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.
-
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.
-
I've never known PHP code to cause an internal server error. Usually that occurrs when you mess around with the .htaccess file.
-
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.
-
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.
-
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.
-
Yes. But I have no idea what you're really asking for. "reverse" has so many different meanings depending on the context.