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...
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...
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
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...
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...
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...
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...
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...
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...
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...
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) {
.
.
.
}...
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...
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...
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
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...
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...
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...
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
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.