Jump to content

Telemachus

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Everything posted by Telemachus

  1. I'm hunting down a hosting solution for someone and though they don't need anything overly large transfer-wise just yet (3tb/month is what they have me shooting to start off with for and that's easy enough), they're very concerned about rapid growth and the bandwidth it may require. After reviewing the options and getting some quotes, I see there are two choices, either go with a reliable and realistic host which has monthly limits per plan but provides real tier one bandwidth, or accept the risks inherent in something allegedly unmetered and hope for the best. I know my obvious skepticism toward the latter makes it sound like I've already decided, but I'm too naive on the matter to know if all the dreadful things I've heard about Cogent provided bandwidth, and even worse the companies which offer it and far oversell their true capacity, are true, and/or whether it may not be that bad an option under certain circumstances. Thanks in advance if anybody well versed in the needs of commercial sites has some opinions and/or advice to offer.
  2. My thought would be either using !="none" which would of course mean flipping the block and none, or maybe even just making a specific declaration in the CSS to begin with if you haven't tried that already.
  3. [quote]...I could put together fairly quickly to generate some income[/quote] I may tinker with some things for myself and my friends, but I'm no web designer by [i]far[/i].  Still, IMHO, that right there seems like a total contradiction to me; if you want to draw people to a site, you have to have valuable and preferably unique content which both brings and keeps them there, whether you choose to distribute a product online or just collect on some advertisements, and you'll only get returns on the time and effort you've invested in the project.
  4. You haven't declared it in any way shape or form though, so when the script tries to evaluate it, inside a function at that, it throws an error.
  5. Usually with select menus I've seen that use onchange, the option you set to selected is just a description, at the very least that makes life easier.  IMHO once you've made the basics workable, any extra effort would be better spent on an "Open in new window" checkbox that just changes the location of the current document if it's unchecked, unless for some reason it's absolutely critical to have both windows open at the same time.
  6. Here's one way of keeping track of how long you listen: [url=http://www.netnebulo.hu/loituma_clock.swf]http://www.netnebulo.hu/loituma_clock.swf[/url] Those who don't care for it that much might get some satisfaction out of this: [url=http://www.netnebulo.hu/hagyma.swf]http://www.netnebulo.hu/hagyma.swf[/url]
  7. You have quotes even though you are trying to use a regular expression, could either use the question mark in a string or just use .match(/\?/)
  8. I didn't feel like plodding through all their scripting, but I'd say they are using setInterval to call a function which increments the clip.
  9. That's the whole point of table-layout:fixed, it will stay 40 pixels wide no matter what's inside it.  You'd need to reduce the length of text between spaces to what fits.
  10. There must be a problem with checked_value not being defined, but that part would be outside of the function you posted, if it's there - sometimes it slips the mind.
  11. I'm thinking: [code]methodCell.innerHTML = '<input type="hidden" name="ShippingOptions[]" value="' + regionID + '|' + methodID + '|' + eval(parseFloat(price) > 0 ? parseFloat(actualPrice) : 0) + '" />'[/code] I'm just assuming floating points are involved, actualPrice has been set as a string, and price is a form field value ???
  12. As for the self closing tags, I avoiding answering it because I wasn't sure if there wasn't some obscure (at least to me) method you could use in place of createElement().  I spent some time googling on it last night but didn't find anything, though I did discover document.createElementNS() which seems to only be useful in standards browsers when you use an xhtml-xml DTD, and even that just gave it an xml namespace (hence the NS) without the self-closing; all I got through view selection source was regular html <[i][/i]br> and <[i][/i]input> tags.  IMHO I would say that if even a method which is meant specifically for that standard doesn't generate tags that meet it, the only option would be to use the innerHTML property to use the correct tags inside a string.  What I still can't say is whether it really matters; the page will still validate in its original state.  There are far better people here than I, but for a quicker answer, that's the best information I can give you.
  13. Just flip it around: document.getElementById(elem).appendChild(newBreak);  You could even drop the newBreak and use document.getElementById(elem).appendChild(document.createElement("br"));
  14. The error you're getting is from trying to add document.getElementById(elem) to the line break.
  15. [url=http://www.regnow.com/affiliate.html]regnow.com[/url]?
  16. HostIP.info Geolocation Plugin in my Firefox says the server is in Scottsdale, Arizona.  ??? I'm close to ten minutes so far, I'm wondering if I want to shoot for the rest of the night.  :D
  17. Sounds like you want to use onblur to call an AJAX function.
  18. Well, let's say you named them email1 and email2, you could do something as easy as [code]if (document.frmCheckout.email1.value != document.frmCheckout.email2.value) alert("Emails do not match.");[/code]  I'd suggest just initializing a variable, say errMsg, and adding specific information to it for each error encountered, and then spitting them all in one alert at the end.
  19. You're welcome, glad it helped.  It just dawned on me this morning that I could have set paymentType to isValid at first and saved the if statement before the switch, but like I said, it was only meant to get you started with your own ideas.
  20. I changed the name of the function for clarity's sake, and gave the form fields generic names for that reason as well.  Now I'll run through it a bit.  Let's say first and last name are the only fields visible for both options, so I'm assigning a variable as true if they are both filled out, and false if not.  Then it finds out the value of the option that's checked, and if the first two required fields were filled out, goes into the switch based on that option.  If a field isn't filled out or in the case of the account number is but isn't a number, or if someway, somehow, neither option got checked, it sets the variable back to false.  If something is missing, it says so and then returns false to the submission, but if everything looks okay it returns true. One could add validation with regular expressions, set an error message based on what exactly is wrong, make the basic function more elegant, etc. but this is just to show the general concept.
  21. This is cheesy and rushed but hopefully will at least help illustrate the concept: [code]function validateForms(){ var isValid = document.frmCheckout.firstName.value && document.frmCheckout.lastName.value; var paymentType; var radio = document.frmCheckout.optPayment; for (var s = 0; s < radio.length; s++){ if (radio[s].checked){ paymentType = radio[s].value; break; } } if (isValid){ switch(paymentType){ case "paypal": accountNumber = document.frmCheckout.accountNumber.value; isValid = accountNumber && !isNaN(accountNumber); break; case "cod": address = document.frmCheckout.address.value; isValid = address; break; default: isValid = false; break; } } if (!isValid){ alert("Some information was missing or incorrect."); return false; } else{ return true; } }[/code]
  22. I would say it depends on what information is required for each; I would imagine a lot of it is going to be the same, so for what is, say first name, last name, email, etc, validate all that first, then find out which radio button is checked and use a switch/case statement based on the radio choice to evaluate the fields unique to that selection.  I'd go into more detail than that but I'd rather see if it's the right track from someone more knowledgeable before you get too far.
  23. My guess would be: [code]onsubmit="return (checkShippingAndPaymentInfo() && hasChosen());"[/code] at least that trims it down to one and it worked when I tested it, but even I know there should be better ways to do it.  One would be having this all in one function, what error did you get when trying to combine them?  To be honest, and I could be very wrong on this, since in theory one of the radio buttons is checked by default, which means if they are set up correctly the only way it can get unchecked is by making another valid selection, is it really even useful to validate that part client-side?  Again, that's more of a question for my sake than a suggestion.
  24. I'm trying that but replacing checkShippingAndPaymentInfo(); with my own function and it's not giving me any problems.  :(
  25. Could you post the exact code as you're using it for me?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.