Jump to content

stefan1294

Members
  • Posts

    15
  • Joined

  • Last visited

stefan1294's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Unfortunately I am not known with your method. Do you know any tutorial about this technique, or could you give me an explanation of how to position borders on your way?
  2. Again, I have a question where I couldn't find the answer of. I think the title explains itself. How will I be able to keep those two borders 50px away from eachother, as my border (#border) increases it's height when needed, automatically. Here is the soruce. The footer has to be ~50px away from the border #border{font-family: Maiandra GD;top: 500px;left: 390px;width:655px;word-wrap: break-word;min-height: 20px;overflow: visible;padding: 10px;border-radius: 15px;border-style: solid;border-width: 1px;border-color: #D0D0D0;position:absolute;margin:-50px auto auto -100px; } #footer{font-family: Maiandra GD;top: 700px;left: 390px;width:675px;height:20px;border-radius: 15px;border-style: solid;border-width: 1px;border-color: #D0D0D0;position:absolute;margin:-50px auto auto -100px;}
  3. Ingolme and ShadowMage both got a point. I'm entering loads of text in that border, and I cannot be arsed to refresh my page (yes, I am writing my whole website from scratch, in Notepad++) every line I type. I'm using the same border for ~12 other pages. It indeed is not necessarily for me to use the word-wrap prop, as I am not using it for 'user data'. However, for the moment it saves me a lot of time.
  4. Thank you. I am working on a project, which will not be released in the public, so I'll justu se the word-wrap prop
  5. Hey, I'm working on a webiste with a border. I have placed the border in a div. I managed to make the border height (div height) to adjust on the amount of text lines in the div. However, I can't make it work for the width of the border. How will I be able to do this?My current script: #border{font-family: Maiandra GD;top: 500px;left: 390px;width:655px;<-- It may not pass this widthmin-height: 20px;overflow: visible;padding: 10px;border-radius: 15px;border-style: solid;border-width: 1px;border-color: #D0D0D0;position:absolute;margin:-50px auto auto -100px; } <div id="border">Hai<br/>haihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihaihai</div> I want the haihai spam, to be seperated to more lines so it simply won't exceed the width of the border.
  6. My question is in the title. How will I be able to get something like that? I did some research, I was checking a couple of tutorials, etc.. But no result, so I'd like to ask it here. Edit: Of course my idea is just to update a 'div' when they go to the about page, for example.
  7. I am not sure what you are talking about, but it's actually working perfectly. var postalcodes = /(AA|AB|AC|AE|AH|AK|AL|AM|AN|AP|AR|AS|AT|AV|AW|AX|AZ|BA|BB|BC|BD|BJ)/g; if(!a.match(postalcodes)) { alert("Not correct!"); return false; } I entered: 7732 CA, it said "Not correct!"I entered 7732 BB and it didn't say anything
  8. Yep, works fine Edit: I just did this to see what the result would be:alert(a.search(postalcodes)); I entered "7856 AA" as postal code, and it alerted "0". I am not sure what to do with it though. It's supposed to say 6
  9. I am using Google Chrome. But for so far I can see, it's the same as in Firefox. And, it doesn't give me an error at all. Yeah, the code is in a function. function validateForm() For so far I know, it is being excecuted after the person pressed "Submit": <form name="form" action="http://google.com" onsubmit="return validateForm()" method="post"> <input type="submit" value="Submit">
  10. I am not sure where I can find that var postalcodes = /(AA||AB||AC||AE||AH||AK||AL||AM||AN||AP||AR||AS||AT||AV||AW||AX||AZ||BA||BB||BC)/g;var a=document.forms["form"]["postcode"].value; if(a.search(postalcodes)) {alert("Correct!");return false; } --<tr><td>Postcode:</td><td><input type="text" name="postcode"></td></tr> Nothing happens when I enter a postalcode (e.g. 7321AA or 7321 AA) Edit: At the moment it's saying "Correct" all the time, what ever I put in the text box/label
  11. I fixed that already - The real problem is not fixed
  12. Hey Ingolme. Thank you for replying. Unfortunately your "||" method didn't fix it for me.
  13. Hello, I am pretty new to JavaScript, but I am working on a project. Currently I have to find a way to determ if a postalcode is an correct postal code. (A dutch postal code) For that I will have to confirm if two correct letters are entered in the form.I think my explanation is really unclear, so I will try to make it more clear for everyone. The postal codes in The Netherlands look like this: 1234 AB. In one place, e.g. Amsterdam, they use the letters "AA, AB, AC, AD, AG, AH, AJ" etc. The script has to look for one of those letters with the correct combination (AA, AB, AC, AD, etc). If I enter a different combination (e.g BA), it should give me the alert "This postal code is incorrect". I have absolutely no idea how to do this, and googling didn't do much as I do not know the keywords I have to look for. Here is an example of my current, not working, script: var postalcodes = /(AA|AB|AC||AE||AH|AK|AL|AM|AN|AP|AR|AS|AT|AV|AW|AX|AZ|BA|BB|BC)/g;var a=document.forms["form"]["postcode"].value; if(a.match(postalcodes)) { alert("Correct!"); return false; // Just doing return false to test the code } I also tried "a.Search()", didn't work neither. Do you guys have any idea how I can do this?
×
×
  • Create New...