Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by elegidito

  1. elegidito

    enabling radio after typing specific query

    There are just a couple things you missed: <script type="text/javascript"> function checkText() { var code = document.getElementById("txtCode").value var special = document.getElementById("radSpecial") if (code == "special code") { special.disabled = false; }else{...
  2. elegidito

    use replace() to remove all commas from string

    var my_string = "This is a string, it has a comma"; my_string = my_string.replace(/,/g,""); "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
  3. elegidito

    Weekly Javascript Countdown

    Well, I got a little bored: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head><title>Timer</title> <script type="text/javascript"><!-- function cTime() { today = new Date(); tempMon = 7-Math.abs(1 - today.getDay()); nMonday =...
  4. elegidito

    Replace function for string object

    Yeah, you need to add the global indicator and change your syntax a bit, like this: var string1 = "hello:dolly:" var string2 = string1.replace(/:/g," "); that should do it "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
  5. elegidito

    execute web pages in javascipt

    Does anyone else think its kind of weird to hear about the "hit new AJAX" technology? This stuff's been around forever (well, awhile), it's just gotten a nice little acronym and recognition thanks to Gmail and others. It can't just be me, can it? ;-) "It is the mark of an educated mind to be...
  6. elegidito

    date last modified

    I've checked this out in FF1.0.7 and IE6, and it gave me different results each time, so the output depends on your browser. I assume the line var p = m.length-8; is to get rid of the time. This might work for you: var m = "Page Updated " + document.lastModified; document.writeln("<right>")...
  7. elegidito

    disable all elements within a div

    Doesn't technically disable everything, but they can't click on the objects in the div(s)...here's a working version (tested in IE6 and FF1.0.7): <html> <head> <script type='text/javascript'> cDivs = new Array(); function disableDivs() { d = document.getElementsByTagName("BODY")[0]...
  8. elegidito

    Javascript does not work in FIREFOX

    Personally, I would go with this method to add options to your select element: y = document.getElementById("front_zoek_regioID"); newOp = document.createElement("option"); newOp.appendChild(document.createTextNode("test")); newOp.value = "testVal"; y.appendChild(newOp) firefox doesn't seem to...
  9. elegidito

    Naming/Finding a group of tags

    You could always fake getElementsByClassName: function getElementsByClassName(a) {mArr = new Array();d = document.getElementsByTagName('*');for (x=0;x<d.length;x++){if (d[x].className == a){mArr[mArr.length]=d[x];}}return mArr;}; then just call it: getElementsByClassName("className"); it...
  10. elegidito

    passing checkbox value with onclick

    do you want to use onClick='foo(this.checked)' "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
  11. elegidito

    event.problems with firefox

    Not sure if this is your problem, but in firefox you need to pass the event to the function like fName(event) then in your function, add a line at the beginning like this: if (!event) event = window.event; Also, you should probably change that last line to accomodate the documentElement...
  12. elegidito

    PocketPC create new list item in a listbox?

    Nah, there's always a way...well...usually. Why not try putting the select in a div, then literally rewriting the div with the new option included in the select: function test(list) { old = list.innerHTML; newOp = "<option value='value'>Text</option>"...
  13. elegidito

    PocketPC create new list item in a listbox?

    I suppose you could try: newOp = document.createElement("option"); newOp.appendChild(document.createTextNode("text")); newOp.value = "value"; list.appendChild(newOp); "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
  14. elegidito

    Dynamically un-check a checkbox?

    Have you tried removing one of the equal signs in this: field.checked == false; so that it looks like field.checked = false;? you only need one equal sign when assigning values, two when checking for equality. "It is the mark of an educated mind to be able to entertain a thought without...
  15. elegidito

    scrolling a document a certain Distance?

    Alright, thanks for the response Dan. I was just wondering if the poster had any problem in implementation . "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle

Part and Inventory Search

Back
Top