Jump to content

Wickham

Advanced Member
  • Posts

    1,114
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Wickham

  1. Why are you using javascript like onfocus and onblur? Your form won't be usable by people with javascript/ActiveX disabled. You aren't using a form, you're using a div class="form" which isn't the same. Why not use a simple form with an action to a mailto email address like one shown here:- http://www.wickham43.net/forms.php or here from a webform without needing an email client on the viewer's computer:- http://www.wickham43.net/formemail.php
  2. Wickham

    CSS3 - Accordian

    If you want an accordion menu that does work in all IE versions, here's one that I've been using for years:- http://www.cssplay.co.uk/menus/slide_definition.html'>http://www.cssplay.co.uk/menus/slide_definition.html There are more at cssplay http://www.cssplay.co.uk/menus/ under Multi-level concertina menus.
  3. The line doesn't show in my IE8 or IE7. It also passes the validator check. Three of your images have a wide black line on the right, like http://200.dcgrandlodge.org/images/Bicen201003142_07.png which forms part of the shadow. Between the image and the black line there is a white space, perhaps that's just showing a little, but not in my IE versions.
  4. I sent single html emails to my friends and after about seven over a period of a few weeks I got an email blocked as spam by my hosting service and had to ring up support to tell them it was only an email to my brother! So they can be quite strict about it, (their computers pick out suspected spam automatically). I realised that it was because I was using a web form where the php mail function had a different email address of mine as the From email address, so the email appeared to be sent from an unknown domain and IP and this labelled it as suspected spam. Hosting services and ISPs like to see computer generated emails coming from their own IP address. I amended my php mail function so that the emails are now sent from my IP address and it's been OK since. Remember that Outlook 2007 doesn't process background-images, although Outlook 2002 does, which seems a backward step, so use only html images. Even then, some ISPs or browsers may block images. They need to be coded with absolute urls like http://www.your-domain/image.jpg. Here's some useful advice:- http://articles.sitepoint.com/article/code-html-email-newsletters http://www.wickham43.net/formhtmlemail.php
  5. Background images can't stretch, so making an image fit any screen resolution is impossible using a background image. You can make an image suitable for most resolutions, say 1024px, 1152px or 1280px wide, and make the background color the same as the edges of the image as far as is possible so that viewers with a larger resolution than the image width will see more or less the same color at the sides and below. Viewers with a smaller resolution will see the sides cut off equally if you center the background image. You can make a normal image operate like a background image and it can then stretch to fit any resolution. See http://www.wickham43.net/backgroundfullwidthflexible.html and drag the window smaller and bigger to see the effect. If you don't specify a height, the height will adjust in proportion but at small window widths there will probably be a space under the image. The image is fixed to the sides with width: 100%, left: 0; right: 0; and can be position: fixed or position: absolute; and has z-index: -1; so that all page content shows on top.
  6. We've had the most fantastic weather here since Thursday - clear blue sky, no wind, cool air and very hot sun, so I've been out on my mountain bike over the farm tracks and footpaths on the chalk downs, still muddy in places with pools of water which made it interesting. The UK usually has weather changes every three or four days due to low pressure systems coming in from the Atlantic, often the remains of hurricanes in the Caribbean (but not this time of year) and the low pressure systems fight with high pressure systems from Russia. It's looking good today at 06.47 UK time and dry but increasingly cloudy weather is forecast for a few days so it's been an exceptional period. The daffodils haven't been destroyed by wind or rain and the cherry blossom is out on a tree I can see through my window, although the main blossom period for fruit trees is still a few days away and I hope the weather doesn't get too bad then. @Eric - it seems that "inherit" is now forming a second part of your life (or is a third or fourth?).
  7. You can check how a page looks in browsershots http://browsershots.org/ but you can't check how it works, like drop down menus or slideshows as it's just one point in time. Bookmark the browsershots page after making your selections and check after 28 minutes. If it hasn't checked all your chosen browsers after 28 minutes, click the button to set it going for another 30 minutes.
  8. The text runs under the images on the right in Firefox and Opera if Javascript is disabled; It's fine when javascript is enabled. When javascript is disabled all the images show one below the other and cover the text, so you may need to redesign the page or find a way to fix the width of the main text areas so that when javascript is disabled the text areas aren't covered.
  9. That's an interesting pure css click menu, Eric, but I notice that IE has to use ActiveX which is javascript. It's important, therefore, to have an alternative menu or site map with conventional links as some people have ActiveX disabled by their IT department or just prefer to have it disabled and won't realize that it's needed.
  10. I looked to see if one was deprecated, but it seems that both are still valid. If you look at the php.net/manual pages, echo (PHP 4, PHP 5) echo — Output one or more strings Description void echo ( string $arg1 [, string $... ] ) print (PHP 4, PHP 5) print — Output a string Description int print ( string $arg ) there are small differences. Echo can be used for more than one string and the code is different. I use echo because that's what Stefan's video tutorial uses! Also I think there might be some confusion using print where people might think that it's supposed to start a computer's printer! Could someone please explain the difference between void echo ( string $arg1 [, string $... ] ) and int print ( string $arg )
  11. Wickham

    Email validation

    I also don't understand all the code, but this is the PHP email validation code that I use (JFab's code is javascript):- if (!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i",$email)) { header( "Location: $errorurl" ); The main difference seems to be that my code has ! for NOT in front of preg_match while your's doesn't. Note that your original code had if (!ereg() which has ! in front of ereg. Both have the ^ in the code. I found that ^ is defined as here http://www.php.net/manual/en/language.operators.bitwise.php so the ^ is not strictly a NOT as I assumed before, but "not both" and I think the ._%- or .- mean opposite or negative so [A-Z0-9._%-] means if not A-Z or 0-9 it is true. I think what the code is doing is saying "if the preg_match as a whole is not true, show the error message" and the code inside the preg_match is saying "if it's not using characters which are not A-Z or numbers which are not 0-9 in all sequences, it is true". That doesn't make sense to me so I still can't get my head round the two NOTs. Additionally, my code has [A-Z]{2,4} where your's has [A-Z]{2,6} and I think this is to limit the number of characters for the domain extension which used to be max four like .info but now there are longer extensions so I should probably increase my code to 6 (if that's what it's for).
  12. Wickham

    Numerical validation

    Can someone please explain how the PHP code for the part in blue in the earlier post works? It was || Eext:; part of if (preg_match('/[^][0-9|| Eext:;]/' , ($_POST['phone']))) { } The part that I use if (preg_match('/[^][0-9]/' , ($_POST['phone']))) { } I understand, but what does the || do and how does Eext:; relate to either ex or Ext ? At a guess, it's excluding any of the letters Eext in any order but why does it have || before and :; afterwards? I suppose the safe but longer way to get phone numbers is to have three input boxes, one for the area code, one for the number and one for any extension (which can be allowed to be empty) and possibly another for country code. Then if in a database it is simple to sort on area code. It's also easier then to feed from a database and display with a space between the sections of the number.
  13. That's a job for PHP but the code could get quite complicated. It's common for web forms to check if input boxes have been filled in correctly, but showing the result on the same page is an extra piece of coding because web forms are normally submitted to an email or database. Here's an example with two boxes so you could repeat for four boxes:- http://www.wickham43.net/form1.php
  14. Thanks Stef, Kyle and Krillz. The comparison with a newspaper is that I want, say, "London Evening Times" to appear at the top of every page, just so if someone arrives at that page without seeing the home page they will see what the website title is, but it's the same for every page which is not good SEO, so I'm coding it as large font in a p tag and then the h1 is for the main page heading, different on every page, which is what you all seem to agree on.
  15. This is an old chestnut - how to code h1 tags. The general consensus from other forums is that the h1 tag should be for the page title, not the website title. See http://www.w3.org/TR/html401/struct/global.html#edef-H1 A heading element briefly describes the topic of the SECTION it introduces. The HTML specifications don't specifically say that the h1 cannot be used for the website title but the reference to section implies that it should be for the most important heading related to the page so that search engines can categorize each page instead of having the same h1 tag text on lots of pages. I often have sites where I want to put the website title at the top of the screen before the h1 tag with the page title, but the general rule is that the h1 tag should be coded first for SEO purposes. If I code the website title in h2 tags and code it before the h1 tag, that's not good for SEO. I don't want to combine the website title and the page title in one h1 tag. I have thought of coding the h1 page title tag first, then the h2 website title and repositioning the h2 website title with position: absolute or position: relative so that it jumps up over the h1 page title on the screen. Is it acceptable and good for SEO to code the website title with a p tag first, possibly followed by some links also in p tags, followed by the h1 page title tag? The h1 tag is no longer the first tag, but it is the first heading tag.
  16. It always seems to be open when I load the page. I've never closed it. Edit: I've just realised that it is always open and overlaps when Javascript is disabled. Looks OK when Javascript is enabled. The green surround with sign out extends below when javascript is disabled, but not when enabled, so it uses less height when javascript is enabled.
  17. It's the same on a page with a post.
  18. Yes that probably will be simpler using 1024*768 as I usually do. When looking at the Forums page my profile box at the top right is open and the bottom just clashes with the Status box underneath. When looking at a post the open profile box just clashes with the start new topic etc.on the right. Using Firefox 3.6.2 on XP 1024*768.
  19. Wickham

    Numerical validation

    If you aren't going to do it the Falkencreative way, then I can only say that my code worked in one of my pages! ereg and eregi are now deprecated and will be removed from PHP 6 so it's best to use preg_match. You ereg code looks odd to me as !ereg is a negative and ^ is a negative so perhaps you have a double negative but I think falkencreative better give an answer as my PHP isn't very good.
  20. I think that everywhere he has ul# it should be ul#nav - just a typo.
  21. Wickham

    Numerical validation

    The precise code will depend on the structure of your PHP code, (assuming you are using PHP), but the basic code will be like this:- if(preg_match('/[^][0-9]/' , $phone)) {echo "<p>Please only use numbers 0 to 9 inclusive.</p>";} where the [^] means NOT There is also a javascript method.
  22. It must have clickable links to serve its purpose. It could be an image with image map "hotspots" over the text or images but it's normally a series of hyperlinks, possibly divided into appropriate sections under headings. It's important to have a site map if you have a drop down menu that only works with javascript or Flash so that if people have these disabled, they have an alternative way of navigating a site.
  23. An email has four sections, To, Subject, Message and From but your mail() function only has three. I also think the last print function should end with a ; print "Message:- $message <br><br>"; // ini_set('sendmail_from', 'admin@websitename.com'); mail($recipient, $subject, $message, "From: $email"); This should sens an email to my@emailaddy.com from the email address entered into the form. It's best to upload and test the form email online as you can't send emails from localhost on your computer without extra code ands a mailserver.
  24. When I click on Today's Active Topics in the left sidebar the words go onto two lines, half on white, half on green, but before clicking all the words are on one line on the green background. I'm using XP 1024*768 and Firefox. Since you're going to get rid of the sidebar, perhaps it doesn't matter.
×
×
  • Create New...