Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by mboehler3

  1. Hi, I'm using id tags for some fields on my form. My "First Name" field looks like this: <input id="firstname" name="LastName" size="24" maxlength="250" tabindex="1" value="First Name*" onfocus="if(this.value == 'First Name*') {this.value = '';}" onblur="if (this.value == '') {this.value = 'First Name*';}" /> As you can see, the field has a value set as "First Name*", indicating the first name field. I want to set the JavaScript validation so that, if a user leaves the field with "First Name*" or leaves the field blank, they are hit with a popup message that tells them to enter in their first name. Here's the JavaScript I have set up: if (document.getElementById('firstname').innerHTML == 0) { message = message + "Please enter your First Name.\n"; } else { if (document.getElementById('firstname').value == 'First Name*') { message = message + "Please enter your First Name.\n"; } } This isn't working though, when I enter in my first name I am still asked to enter in my first name. Not sure what the issue is, can someone please offer some advice? Thanks in advance for your help and time.
  2. Hi, my form here collects the first name and last name fields, and these fields need to have the same name in order to be properly placed in our database.I have JS validation set up to make sure something is entered for email and company. But when I set something up for the name fields, the validation breaks. Here's what I have in place now: function checkrefervalues(){ message = ""; if (document.referaclient.company.value.length ==0){ message = message+"Please enter your Company Name.\n"; } if (document.referaclient.Email.value.length == 0) { message = message + "Please enter your Email Address.\n"; } else { checkemail(document.referaclient.Email.value) } if (message.length > 0){ alert(message); return false; } pageTracker._trackEvent('Accountant Forms', 'PMISubscription'); return true; } function checkemail(str){ var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if (filter.test(str)) testresults=true else{ message = message + "Email address seems incorrect (check @ and .'s)\n" return false; } } function IsNumeric(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } var isNN = (navigator.appName.indexOf("Netscape")!=-1); function autoTab(input,len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(input.value.length >= len && !containsElement(filter,keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input)+1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while(!found && index < arr.length) if(arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input)index = i; else i++; return index; } return true; } Is there any way to make sure the first and last name fields get filled out?
  3. I'm trying to accomplish what's done on this page here: http://www.hotchocolatechicago.com/, without using Flash.If you shrink your browser, and then slowly expand it, you'll see the chocolate milkshake in the background resizes with the browser size. It does not become pixelated when you stretch it out, it appears that is always maintains its resolution.I would guess that the image is a rather large image, and is displayed at ~30% of its size when the browser is shrunk, then expands with the browser. Not sure how to go about coding this though.Thanks for any help you can provide!
  4. Hi, I'm trying to add ASP validation to the form on this page here.Here's the code that I created: <%If Request("POSTBACK") = "YES" Then oops = "" name = Trim(Request("name")) Set nmre = New RegExp nmre.Pattern = "^[a-zA-Z\'\-]{3,99}$" If name = "Your Name" OR Not nmre.Test( Replace(name," ","") ) Then oops = oops & "<li>Please enter your name</li>" End If Set emre = New RegExp emre.Pattern = "^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$" emre.IgnoreCase = True If Not emre.Test( Request("email") ) Then oops = oops & "<li>Please enter a valid email address</li>" End If If oops = "" Then Server.Transfer "/ask-michael/#thankyou" End If Response.Write "Please correct the following errors and submit the form again:<ul>" & oops & "</ul>"End If%><form method="post" name="askmichael" onSubmit="return checkrefervalues();"><input name="POSTBACK" type="hidden" value="YES"> When I hit submit on the form (with all valid fields), I get this error: "Please correct the following errors and submit the form again:," with nothing listed. Am I close to getting this validation to work?
  5. I'm having trouble styling my list items with my own list item image. Here's the image that I want to use for the list item: . This image is very small, 20x22, and leaves just a couple pixels of white space to the right of the "X."Here is the code for my page: <ul class="using-other"><li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a felis fermentum ipsum imperdiet eleifend eu vel velit.</li><li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li><li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a felis fermentum.</li></ul> And CSS: ul.using-other {list-style-image:url('compare-check.gif'); margin:0 0 0 35px;padding:0}ul.using-other li {padding:0;margin:0} Now the problem is how this renders in a browser. It displays like this:ImageI want the "X" mark aligned with the text better. It seems like the text is not aligned to the top, which is what I want - to push up the text while keeping the image at the same position. How can I accomplish that?
  6. No I'm not. I'm pretty sure it has not. I apologize, this is the first time I've set up an ASP environment by myself. I'm not sure how to set up the ASP module for Apache.
  7. Ok, I believe the problem is because I do not have the server configured to run ASP. This is the error message I see:Not FoundThe requested URL / was not found on this server.Apache/2.0.54 Server at www.mywebsite.com Port 80 I found this resource here: http://www.w3schools.com/ASP/asp_install.asp but I don't see anything about setting it up on your website. Is it difficult?
  8. Ok, I've changed the code around to look like this:<!--#include file="/header.asp"--> And the header file still does not load. I've tried "header.asp" and "\header.asp," both did not work. I don't understand what I'm missing...
  9. I have "header.asp" in the root directory where "default.asp" exists. I've tried putting a "/" before header.asp and tried without it, both times the header did not load.
  10. Do I need to set up MySQL? Here's the code on my 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" lang="en-US" xml:lang="en-US"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>Bumper Stickers</title><meta name="description" content="" /><meta name="keywords" content="" /><link rel="stylesheet" href="skins/style.css" /></head><body><!-- #include virtual = "/header.asp" --><img src="images/stage-header.gif" /><div class="stage"><h1 title="Bumper Stickers You Won't Find at the Gift Shop">Bumper Stickers You Won't Find at the Gift Shop</h1><h2 title="Dazzle the Accounting World with Your Bumper Sticker — You Could Win a $500 Gas Card">Dazzle the Accounting World with Your Bumper Sticker — You Could Win a $500 Gas Card</h2><img src="images/free-500-gas-card.jpg" /><p>Come on — we know you've got a creative side. We're giving you the opportunity to show you can have fun with the best of them.</p><p><strong>Make Your Own Bumper Sticker for Your Chance to Win a $500 Gas Card</strong></p></div><img src="images/stage-footer.gif" /></div></body></html>
  11. Hi all, I work for a company that uses ASP files on the website. I'm not sure if it's ASP or ASP.net. The company site is here.I would like to recreate the same environment for a website I recently purchased from GoDaddy. There's two main reasons I want to use ASP:1.) Use include files in ASP2.) Define and pass variables through the query stringNow, I've just gone ahead and saved the first page as default.asp. I've created a separate header file, and the default.asp calls for the header as an include file. When I uploaded these files to the server, the include file does not show up.I was hoping that making the site ASP would be easy, but I'm not sure if it works like that. Can someone help me out?Is my work website ASP or ASP.NET? I want to set up my new website just like that, so what steps do I need to take in order to do this?Thanks to anyone who can help out and set me straight.
  12. Hi, I have a simple PHP question. I usually write code in HTML or ASP. In HTML when I want to access my file off of the root directory, I will name it "index.html" and can just type in the folder name to access the page. In ASP I can do the same thing with "default.asp". What can I name it in PHP to do the same?
  13. Hi, I am creating a simple website where the stage has rounded corners. To achieve this, I cut out a header and footer with the rounded corners, and a background that repeats. My code looks like this: <img src="images/stage-header.gif" /><div class="stage">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat nunc non sem feugiat aliquam. Etiam ut lorem risus, nec porta orci. Etiam commodo sem dui, vel lacinia enim. Maecenas metus libero, aliquet vel rhoncus ac, fringilla ut eros. Fusce eget nulla vitae magna sollicitudin rutrum. Duis mollis aliquam dictum. In tortor tellus, mollis a venenatis eu, congue non odio. Curabitur quis massa vel nisl luctus hendrerit non quis lectus. Etiam vel orci non justo consectetur cursus eu ut odio. Cras accumsan purus at urna convallis aliquet. Sed iaculis suscipit iaculis. Nam ultricies pellentesque eros, et tincidunt nibh fringilla ac. Proin sapien lorem, euismod sit amet molestie at, laoreet eget neque. Curabitur nisi mauris, rhoncus vitae volutpat vel, bibendum a felis. </div><img src="images/stage-footer.gif" /> My CSS looks like this: html, body {border:0;padding:0;}.stage {background:url('images/stage-background.gif') repeat-y; width:1073px} I have created a master folder on my desktop. In that folder is my index.html file, an images folder and a skins folder. In the images folder is my images, the skins folder has my CSS.I'm very confused as to why this is not loading. Any help is greatly appreciated.
  14. Hi all,My page is here: http://surepayrollwidget.com/blog/If you scroll about half way down the page on the right hand side you'll see the "Navigation" box. I want the green arrows to align with the text, right now, the text is aligned slightly underneath the arrow. I tried adding vertical-align:top to the CSS, but it didn't solve the problem. Any ideas?
  15. Ok, that's what I thought at first. I did move my tracking code before the tabber script, and the tabber still doesn't not function.
  16. Ok cool... I apologize in advance, but I don't know what to reposition. Do I need to take a snippit of code out of tabber9.compressed.js and move it to its own .js file?
  17. Hi, I have my page here. There is a tab system on the page that uses javascript. View the source the see the javascript file (tabber9.compressed.js).Now, on my end, I am adding some tracking code. The code looks like this: <script TYPE='text/javascript' LANGUAGE='JavaScript'><!-- // window.onload = initPage; function initPage() { if (this.GetCustomerGUID) document.forms["Test"].elements["CustomerGUID"].value = GetCustomerGUID(); }//--></SCRIPT> The problem is, when I add this code to my footer, it breaks the tab system. The tabs don't work any more.I am not a JavaScript expert by any means (or else I would have known what the issue is! lol) but, I guess it has something to do with the window.onload function? I say that because I see the window.onload code in the tabber javascript as well.Any advice or help anyone can give would be greatly appreciated. Thanks in advance for any help!
  18. Ah, so that was the problem. Got it, solved it. Thanks sir!
  19. Hi all, my page I am working on is here: http://www.lps.surepayroll.com/2011-3-stepAs you can see, there is a white box in the middle of the page. On my screen, which is maximized, I see the box sitting perfectly in the center. But, when I bring the browser out of full screen view and play with the width of the browser, the box doesn't move along with the page. For example, if I take my browser window and shrink it going from right to left, the white box goes out of plain view. I can't see it.I want to have the white box move as the browser window shrinks, where it's always centered on the page. Obviously I understand that if the browser window shrinks to like 200 pixels wide it will have to cut off some of the box. But I've seen this accomplished before where if you shrink/expand the browser window, the content will position itself accordingly. Does anyone know what CSS I can apply that will cause this to happen?It's always something I've wanted to know but just never got around to posting. Now I need to know for this project. Thanks again for any help!
  20. To clarify, I meant when a user goes to the site, plays with the bumpersticker, leaves the site (closes their browser). Then later in the hour/day/week they return.
  21. On deeper pages in my website, adding slashes in-between folders still loads pages. For example:My website is www.example.com/folder/subfolder/In the URL box, I'll edit it to www.example.com////folder//subfolder/And the page loads for both URLs. I only want to make the first URL work. Is there any way to do this?
  22. I'd like it to me temporary, so when they start another session on my page, their previous bumper sticker no longer remains.
  • Create New...