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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. deputydoofy

    Date compare

    I wrote a function some time back that gets the ordinal number (some people incorrectly refer to it as Julian date). The ordinal number is literally the number of days within the year, so... Jan. 1 = 1 Jan. 2 = 2 .. Feb. 1 = 32 . . . Dec. 31 = 365 (or 366 for leap years) At that point, you...
  2. deputydoofy

    spanish date script

    Just as a side note, you should use today.getFullYear() if you want the year in 4 digits. Also, I don't even think you need to specifically check that the year is less than or greater than 2000 unless you simply want to send an alert to the user to fix their time/date settings. Lastly, if you're...
  3. deputydoofy

    Unistalling applications on a Mac

    The beauty of MOST Mac apps is that they are packaged as a single file and, as such, you can simply trash the file and it's "uninstalled." Occasionally, some files put things into the library folders, but it's still no DLL hell. :D http://mywebpages.comcast.net/doofymusic
  4. deputydoofy

    random background image

    function random(){ document.body.style.background("<SRC='background/" + Math.ceil(Math.random() * 3) + ".jpg' WIDTH=1024 HEIGHT=634 BORDER=0 >") //--> } I think the code is a bit crowded. It's ok to break it into a few lines so you understand what you were doing and why. function...
  5. deputydoofy

    message box with Yes/No

    Here's another possible solution. Like Kaht said, how about making your own "pop-up" using a div tag with a border and 2 buttons that say yes or no (give them class="pop_up" or whatever class name you choose). Kaht also mentioned that it's not modal so, yes, the user could still hit other...
  6. deputydoofy

    Round Number onchange

    I haven't typed it in to see what might work, but have you considered using onkeyup (or onkeypress) rather than onchange, since it is text? Secondly, and this is a question for me, why do you call the function in this manner: round(this.id); and then in the function, use the...
  7. deputydoofy

    Ignoring Tags using Javascript

    I forgot to add.... Try testing that code by removing your bit of CSS first and see if the text within the P tags remain. If they still disappear, then you have to add more to the loop, such as: - Obtain text in the P tag's childnode. - remove P - Add text to former P tag's parent node...
  8. deputydoofy

    Ignoring Tags using Javascript

    The next best thing would be to remove the P tags dynamically. Off the top of my head, it might look something like this. function removePTags() { var p=document.getElementsByTagName("p"); var parent; var i; for (i=p.length-1; i>=0; i--) { parent=p[i].parentNode...
  9. deputydoofy

    How to display a table with Javascript???

    I think it also depends on whether you want to dynamically create the table or if you're just concerned about when a table might be displayed. If you want to simply build a table dynamically, your best bet is to build the table using the DOM. var table=document.createElement("table"); var...
  10. deputydoofy

    HTML form control check?

    Yes. First, either grab the specific input element or all the elements. /* For a specific element. Search by its id property. var input=document.getElementById("element_id"); OR // For an array of all elements in your document. var inputs=document.getElementsByTagName("input"); For the first...
  11. deputydoofy

    Not over - string parsing....:-)

    if((holder) == dayOne || dayTwo){ } Without really diving into your posted code, I think this may be the problem. If you are trying to compare holder to each of those values, then you should be writing it like this: if (holder==dayOne || holder==dayTwo) { . . . }...
  12. deputydoofy

    Enable and disable form button

    Hmmmmm. Let's try.... <input type="image" src="pics/btn_submit.gif" width="80" height="19" name="submitit" id="submitit" onclick="return dosubmit();"> Ok, what I did was change the onclick to: onclick="return dosubmit();" In theory, if it returns false, I'm thinking the submit should not...
  13. deputydoofy

    Enable and disable form button

    Yes. Simply have your button call the function: <input type="image" src="pics/btn_submit.gif" width="80" height="19" name="submitit" id="submitit" onclick="dosubmit();"> I also added an id attribute so I could access it with the DOM. Then, in the actual verification, set the disabled value...
  14. deputydoofy

    Basic question about function()

    Thanks, tsdragon. I also appreciate the explanation. http://mywebpages.comcast.net/doofymusic
  15. deputydoofy

    Basic question about function()

    Or it could be a simple equation: var sum = addFunction(5,3); function addFunction(a,b) { return (a+b); } The variable, sum, would be 8. http://mywebpages.comcast.net/doofymusic
  16. deputydoofy

    Detect Change In Frames URL

    Now, I'm doing this off of memory only, but if you simply want to get the URL of a specific frame in javascript, you should be able to do the following. var startURL=parent.frame_name.location.href; ... ...where frame_name is the name of the frame you want to check...
  17. deputydoofy

    Simple checkbox problem

    If you don't want to limit it to a specific form, you can hit the whole page by doing the following. function disableCheckboxes() { // Using the DOM method, set a variable (array) to be all // input tags on the page. var inputs=document.getElementsByTagName("input"); var i; for (i=0...
  18. deputydoofy

    Variables in functions

    Lee is right. Any variables you declare before functions are considered global. var doofy=""; Any reference to the variable doofy in or out functions refers to the SAME doofy. I don't know, however, if, when you declare a var doofy in a function after that, it makes a local doofy (though I'm...
  19. deputydoofy

    Bonus / Pay lower than call centre agents

    I realize that but no other companies gave me any chance. So it was the choice of being low-balled or probably still sitting on customer service wondering if I'd ever leave that job. The lesser of 2 evils, I guess. http://mywebpages.comcast.net/doofymusic
  20. deputydoofy

    Beginer looking for directions as to building a java intro to a web pa

    Trollacious, I don't disagree with that. :) However, since my pages are all done as a hobby, I tend not to worry about people still using old browsers. I'm not still playing Combat on my Atari 2600. Well... I am, but it's through emulation. :D http://mywebpages.comcast.net/doofymusic

Part and Inventory Search

Back
Top