Jump to content


  • Posts

  • Joined

  • Last visited

About AndrewAK

  • Birthday January 21

Previous Fields

  • Languages
    HTML5, CSS3, PHP5, MySQL

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Gender
  • Location

AndrewAK's Achievements


Newbie (1/7)



  1. This Link refers to a file that is in the main folder <link rel="stylesheet" type="text/css" href="mystyle.css"> What is the proper path used when referencing a file located in a sub-folder?
  2. Thank you Gabrielphp, that worked perfectly. I tested for the negative. if(!is_numeric($phonenum1)){ $phonenum1Err="Only numbers0-9"}
  3. Here is a snippet of my code. It works fine, but checks for upper and lower case letters. if (empty($_POST["lastname"])) { $lastnameErr = "Lastname is required"; } else { $lastname = test_input($_POST["lastname"]); if (!preg_match("/^[a-zA-Z ]*$/",$lastname)) { $lastnameErr = "Only letters and white space allowed"; } } I need this to check for numbers only IE: 0-9 for a phone number format. Thank you
  4. Thanks for the tip. I'll look into some alternatives.
  5. I have a piece of JavaScript that uses some <a> elements to create navigational links on the site that I’m working with. The navigational links are on all of the pages. That makes it tedious to update or add any links. I’m wondering if there are ways that I can incorporate an .html file with a <link> element just as if I were linking a .js or .css document to an HTML/XHTML page.This is a basic <ul> that references ids from some <div>s The ids are in bold face: <ul> <!--1st anchor link and menu --> <li><a href="newindex.html">Home</a> | </li> <!--2nd anchor link and menu --> <li><a href="contacts.html">Contact Us</a> | </li> <li><a href="http://www.hogalaska.com/AdvancedGuestBook/">Guestbook</a> | </li> <li><a href="" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, [b]'anylinkmenu3'[/b])">Site Map</a> | </li> <li class="navigation"><a href="" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, [b]'anylinkmenu4'[/b])">Links</a> | </li> <li><a href="" onclick="return clickreturnvalue()" onmouseover="dropdownmenu(this, event, [b]'anylinkmenu5'[/b])">Policies</a> | </li> </ul> The repetative code that I want to put into an external file and link to the main page: <div id="anylinkmenu3" class="anylinkcss" style="width: 125px;"> <a href="help.html">Help</a> <a href="history.html">History</a> <a href="membership.html">Membership</a> <a href="membersonly.html">Member's Only</a> <a href="loh.html">Ladys of Harley</a> <a href="http://www.hogalaska.com/calendar/">Event Calandar</a></div><div id="anylinkmenu4" class="anylinkcss" style="width: 125px;"> <a href="http://www.harleyalaska.com/">Sponsor</a> <a href="http://www.akrider.com/">Alaska Rider Tours & Rental</a> <a href="http://www.harley-davidson.com/wcm/Content/Pages/home.jsp?locale=en_US">H.D. Motor Co.</a> <a href="http://www.harley-davidson.com/wcm/Content/Pages/HOG/HOG.jsp?locale=en_us">H.O.G.(National)</a></div><div id="anylinkmenu5" class="anylinkcss" style="width: 125px;"> <a href="patching.html">Patching</a> <a href="privacy.html">Privacy</a> </div> FYI: This website that I'm working with is XHTML 1.0 compliant, for the most part.
  6. Also, you might want to include some standard code for the template document you are putting together. The following is standard "XHTML 1.0 Strict" code for a basic blank page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body></body></html> If you are learning things at this point, as I am relearning much, try to focus on XHTML rather than HTML. That's what I was advised to do and I think that it's reflected in my programing habits.
  7. I'm experiencing "code-lock" Is it even possible to put an <a> element within an <option> element that is a part of a <select> element?As far as I can work the logic, it would look somthing like the following code: <select id="somename"><option><a href="some url">Some Text</a></option></select> I've tried to get this to work and can't make it happen.Am I missing somthing?I have read about XHTML/HTML Events like "onclick" but can't remember how to use it to load a file from a known location.I should explain myself further. The ultimate goal here is to load a PDF file into the browser with a link that is within the <select> element.
  8. The Head First books are designed for the ultra-beginner. They cover much of the very basics of the topic at hand. So far, I'm on chapter #4 of HF-JavaScript after finishing the HF-HTML/XHTML/CSS book. Much of the examples are refreshing for me to get back up to speed. I use some of the examples, but not all. I can skim a chapter and I'm fine. If you are just getting aquainted with web programing and are very new to the subject, reading all of the chapters would be wise. BTW-I submitted two pages of the website that I'm redesigning to the W3C Validator Service and they passed!
  9. I started with HTML in the 90s and learned most of what I know from the early books on the subject. I took a break from web stuff for a while due to the demands from my job (a was a hobbyist). I recently volunteered to Webmaster a website for a non-profit group and started studying again. I finished the Head First book on HTML and CSS. It was a great refresher and I knew nothing of XHTML or CSS. I'm currently reading my second Head First book, JavaScript. Personally I like to read a book more than read online. W3Schools has been a great help for me when I need current programming practices explained.
  10. The folowing is a snippet of an array that reproduces an HTML <a> element. I ran my entire page through the W3C validateor and I get the errors listed at the bottom. var pausecontent=new Array()pausecontent[0]=("<a href='http://www.travel.state.gov/passport/passport_1738.html'>U.S. Department of State</a><p>If you have plans to ride with us to Milwaukee in the Fall, it would be a good time to get your passport application started.</p>")pausecontent[1]=("<a href=''></a><br />Be sure to get your bike checked by a competant mechanic before the new riding season begins. Also be sure to continuously check the tread on your tires. You may need new rubber. ")pausecontent[2]=("<a href=''>Open Link</a> Put some other new information here to fill up the empty space.") The errors the W3C validateor listed. Line 15, Column 83: document type does not allow element "a" here.…tate.gov/passport/passport_1738.html'>U.S. Department of State</a><p>If you h Line 15, Column 114: document type does not allow element "p" here.….html'>U.S. Department of State</a><p>If you have plans to ride with us to MiThere were 19 errors total. The two listed above are examples of most, if not all of the errors.When I refreshed the page in my browser everything worked fine. The code just didn't validate. So, my question is...What is the correct way to reproduce HTML/XHTML within Javascript?
  • Create New...