Feedback on: JavaScript FAQ Knowledge Base
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Very nice. A worthy addition. On the question about randomising sounds there is a very small error: the last sentence mentions that the script will play a random sound file from sound1.htm to sound9.htm, when the extension should in fact be wav.
See you on the 20th!
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Hi Martin,
maybe I have an idea for
Q367 in 'windows':
----------------------------
<html>
<head>
<title>Neue Seite </title>
<script LANGUAGE="JavaScript">
function newBrowser()
{newBr=window.open('your_url.htm','newWin','toolbar=0,location=0,
directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=750,height=550')
}
</script>
</head>
<body>
<p>Hier öffnet sich ein <a href onClick="newBrowser()">neues Fenster</a> .</p>
</body>
</html>
--------------------------------
Not very nice, but should work
(well, in IE4..).
By the way: your FAQs are great!
Bye,
Marc
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Clear and well described.
Worth:
Worth reading
Comments:
Hello
Javascript can read any windows 95 text document using ie4. Check out my tutorial at http://www.angelfire.com/mb/bbep/javascript.html
Worth:
Very worth reading
Comments:
Excellent website. However, I had one minor problem with the following page:
http://www.irt.org/script/image.htm
There is a link about 65% down the page entitled:
"I need to know if there's anyway to get Netscape to let you dynamically resize your images through JavaScript?" Is the linked document the correct one? Thanks again for an excellent site.
Dante Ciolfi
Worth:
Very worth reading
Comments:
I have been using the JavaScript FAQ Knowledge Base quite consistently over the past few days. It has been EXTREMEMLY helful. Since this site has been so helpful to me, I just wanted to point out a possible solution to Q272. I noticed that you solved the problem by depending on frames. However, this solution only works provided the hidden frame remains when URLs change. Another possible solution that will work all the time (it took me much time to figure this out) is as follows:
function MyOpen(url, name, features)
{
var aWindow = open("", name, features);
if( aWindow.location.href == "about:blank" )
{
aWindow.location.replace( url );
}
}
When you pass the open function a "" for the url, it does not change the url of the existing window (if indeed it does exist... otherwise it creates one with a href of "about:blank"). This works just as good as checking to see if the window exists.
Thanks.
-Mark
Worth:
Very worth reading
Comments:
Hey Martin,
I have another solution for this FAQ.
Do you know of anyway to have JavaScript retrieve data from a .txt file located on the server?
If you use frames you can reload a frame with the data in it that is then written to a text object in a form. I have done this and it works great.
Just thought I would mention that.
Ray
http://www.crays.com/jsc
Worth:
Very worth reading
Length:
Just right
Technical:
Too technical
Comments:
Your Java scripts are very good but, the one that stops my website provider from opening a pop up widow, will not work. Is there any other scrips or html that might work?
Worth:
Not worth reading
Comments:
It WOULD be useful if it worked!
But it does not work either in NS4 or MSIE4 (SP1)
Please note that the same problems occur in related articles and supply a working demo.
I tried your stuff 'as is'.
Worth:
Very worth reading
Length:
Too short
Comments:
Hey there . . .
First, I wish to tell you that I found you JavaScript FAQ section very informative . . . have gained alot more knowledge, and plan on implementing some of the techniques in the future.
I do wish to comment on one of your answers. The URL of this specific issue is as follows :
http://www.irt.org/script/545.htm
Q545: Is there a way to make a link that when clicked will add the current page to the user's bookmarks or favourites, i.e. a link that simulates Ctrl+D?
Answer: NO
The above answer is not correct. There is a command that is accepted by MIE 4.0 (and AOL 4.0) but is not directed appropriately within the NetScape environment.
Note: I have only tried this within the WINDOWS 95 operating system.
An example of the command is as follows :
<A CLASS=sect HREF=': Add to my favorites folder' ONDRAGSTART='return false' onclick='window.external.AddFavorite("http://www.insideDHTML.com","Inside Dynamic HTML");return false'><FONT FACE='geneva,arial,sans-serif' SIZE=1 COLOR=black><EM>Add to my Favorites</EM></FONT></A>
You may wish to append your previous answer, so future visitors might be better advised.
Thanx so much for your informative web-site . . . I have gained lots of knowledge as well as insight.
Please verify unto me that you have received this posting.
P. J.
pjfschr369@aol.com
Worth:
Worth reading
Comments:
Terminology point: Where in the world did you come up with the term "object-orientated"???
Whatever happened to "object oriented," which I see in every other textbook & website out there.
Damages the credibility of your knowledgebase to misuse such a fundamental term.
No offense, just look it up.
Worth:
Worth reading
Comments:
First,
Best site on javascript I have seen yet and I have seen many.
What I don't like is that in some articles you say that X is possible but you don't show exactly how to do it.
I reckon I want to do something that most people would want to do.
I want to write values to hidden fields to a form.
Specifically these:
· Operating system used by the visitor
· Browser type
· Screen resolution
· Color depth
· Time survey was taken
· Referrer location
Where can I get those (for both NN and IE 4 and up). Any real online examples? I saw the thing with the images but that won't work for this.
Thanks
Worth:
Not worth reading
Comments:
I could not use the answer to "Q7 How do you round a number to a X decimal places?". At least in Netscape 4.05, you cannot multiply decimal numbers and expect a correct answer. For instance, in Netscape 4.05, 74.85 * Math(10,2) = 7485.999999. I'm guessing this is because Javascript treats these numbers as floating point, and therefore handles the decimals imprecisely. My solution is to work in integers for doing calculations, and then convert them to decimals whenever I need to display them (such as in a calculator). Any other insights would be greatly appreciated.
Comments:
This script throws an error in ie4 on NT4 - 'class does not support automation'.
Worth:
Very worth reading
Comments:
The answer to Q147 is Not Quite Right. Use the getUTCXXXX() functions to avoid time zone mistmatch errors.
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
http://www.irt.org/script/272.htm says that a hidden frame is the only way to get to a previously opened window. this is'n exactly true. 'window.open("", "window_name")' returns a handle to the window, and you can from there manipulate the window as if it was openened by the page. the problem lies with actually knowing that the window is opened. I chose to use cookies, but 'location.search' should also be a solution. a hidden frame is the third. there should be a solution mentioned for those that do not wish to use frames, in my opinion.
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Maybe there's an answer to your
question 311 : How do I disable the "Back" button of a browser?
Check this page from Inside DHTML : Leaving the past behind.
http://www.insidedhtml.com/tips/html/ts15/page1.asp
Maybe something for your site ?
Regards,
Kristof Donne
Worth:
Very worth reading
Comments:
The absolute best source for JavaScript information hands down! Keep up the good work.
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
Thank you for providing this valuable, "life-saving" reference site.
Comments:
Just looked very quickly at your site, and it looks good.
One of the questions I looked at is the "How do I send e-mail from JavaScript?". The answer is wrong (http://www.irt.org/script/134.htm). The e-mailing of a form will work in Internet Explorer 4 (and maybe 3).
Also, I have a JScript FAQ (still in progress...) that takes a slightly different approach - it deals with broader issues than just "how do I do <bla>?".
Anyway, I'll be linking to your site soon, and maybe you could do the same?
http://www.netspace.net.au/~torrboy/code/jscriptfaq/
Thanks,
Peter
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Brilliant source of information
Worth:
Worth reading
Length:
Just right
Comments:
...you've got bugs on http://www.irt.org/script/254.htm
First of all: The backslash that appears before all slashes shouldn't be there.
Also, you have omitted the </SCRIPT>-tag. But the page provided the information I needed, so I'm happy with it.
Worth:
Very worth reading
Comments:
I'm creating my first web page and have spent many long hours figuring out what to do. I started searching the web when I wanted to find out how to open links in a separate window (many different links). After suffering through many pages that didn't have what I wanted, or didn't explain things very well, I was extremely satisfied when I found your page. I just cut and pasted, and everything worked fine! Thank you!!
Worth:
Very worth reading
Technical:
Just right
Comments:
There seems to be a typo on page http://www.irt.org/script/258.htm.
Presumably MISE in the following code should read MSIE.
if (navigator.appVersion.indexOf('MISE 3') > -1)
Just thought you'd like to know. And thanks for the wonderful resource.
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
An excellent source for all things JavaScript! I bookmarked it straight away! Much better (deeper) than some of the "commercial" sites. I haven't been able to find the definitive answer to my JS question, so I'll post that next. Thanks
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
I just read q388 (using non-alpha form names) and the solution provided didn't work for me in IE4. It works in Netscape 4 though. Even using the notation:
document.formName.elements['1-2-xxx'].value;
I get an error in IE4 saying that it is not an object.
Worth:
Worth reading
Comments:
http://www.irt.org/script/481.htm gives an ActiveX-component to do printing in IE4/3. Microsoft has also released a script for doing printing in IE4 as well as a thorough explanation of window.print() in IE5. URL is http://msdn.microsoft.com/msdn-online/workshop/author/script/dhtmlprint.asp
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Y'all do a great job explaining some complex issues in the various FAQs and Knowledge bases. Keep up the great work.
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Can I print the current page using JavaScript on both NN and MSIE?
In regards to the above question, the solution you provided to print from MSIE will only work on a windows platform. It relies on a com object which does not exist on the macintosh.
Worth:
Very worth reading
Comments:
I'd like another FAQ: Things You Can't Do.
It could have sub-sections for
.. because of security
.. because of bugs
.. because of holes in the language
.. because of missing browser features
This would save time when looking for
a way to do things.
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Well I haven't even come close to reading about all the stuff I want to know about and I think it might take me a while.
The best way to show my appreciation is
COMPREHENSIVE
Boy, is my web page gonna be a pearla!!!
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
I tried to use the "Ask a Question" link at the bottom and was given an error page.
I would like to use Javascript mouseovers in one frame <navbar>, but would also like the highlight state to remain if the target page is loaded in the other frame. Is there a way to do this?
I guess it would be a mashing of mouseover and frame detection. I presume that it would mean a pretty long javascript if I had 10 buttons with mouseovers and target ages to detect. Sounds inelegant.
Thanks,
Chip
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
**** Sorry, I forgot something. presuming that there is a script out there to do this, would it get snarled by a back button event? *****
----- previous question ------
I tried to use the "Ask a Question" link at the bottom and was given an error page.
I would like to use Javascript mouseovers in one frame <navbar>, but would also like the highlight state to remain if the target page is loaded in the other frame. Is there a way to do this?
I guess it would be a mashing of mouseover and frame detection. I presume that it would mean a pretty long javascript if I had 10 buttons with mouseovers and target ages to detect. Sounds inelegant.
Thanks,
Chip
Technical:
Not technical enough
Comments:
how to validate email in form fields
Length:
Too short
Comments:
i am looking for a simple answer as to why when i am in yahoo chat i constantly get warning applet window signs that say ? yes or no and i am constantly freezing while the html reloads ( i guess that is how to put it) must continually click refresh button and even that does not always work- i can be anywhere eles on internette but yahoo chat and have no problems- and another constant is a close or ignore sign which i usually cannot ignore - thank you
Worth:
Very worth reading
Comments:
Just a bug fix for the article Q590
Here's a bug fixed version of the start of the startTimer function.
function startTimer() {
myTimer = setTimeout('myFunction()',10000); // myTimer holds the id of the timer
timerRunning = true; // whenever you start a timer set the timerRunning flag to true
}
Worth:
Very worth reading
Comments:
Couldn't find an answer to this questions:
How do I open a pop-up window (that fits to the screen and does not have any buttons or scroll) when a user visits my website and then close the original window?
NOTE: I tried to ask this question by clicking on the "ASK A QUESTION" link but got an error 404.
Worth:
Very worth reading
Comments:
Regarding the FAQ on "Disabling Broswer Back Button"... How about putting in previous web page: javascript:window.history.forward(1); ??
Seems to work.
Let me know what you think.
James
Worth:
Not worth reading
Comments:
Your answer to the question of calculating the days between two dates is wrong.
You should be using getFullYear not getYear. getYear is obsolete and is implemented differently by different browers. Some report 2000 as 2000, others as 100.
Worth:
Not worth reading
Comments:
As an added bonus, your confirmation page shows the
submission date year as "100"
which is equally wrong.
Worth:
Very worth reading
Comments:
I can't seem to add a question, the links are all broken. What is up?
Length:
Just right
Technical:
Just right
Comments:
The link to "Ask a question" did not work.
So I thought I could use this form to ask my question:
Is there any way to use the onMouseOver event with DIV or SPAN tags in Netscape Navigator ?
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
Q157 Is there a way for me to validate a form BEFORE submit so it will never arrive at the page?
In regards to the above article, I would have also mentioned using the onBlur event handler to validate each part of the form as you fill it out. (Of course, I usually use the onSubmit return method myself.) But this is a valid, if rather unweildy way of validating each item as you pass them.
By the way, I love this resource. Keep up the great work!
Worth:
Very worth reading
Comments:
I have looking for a good resource of Javascript for a long time. This is one is the best I've ever seen. It not only provide me with answers to all kinds of problems I have at work, also I found out tons of stuff I am interested in.
If you can also find somebody to provide information on ASP, that would be excellent for all the professinals.
Thank you very much for provide us with such a wonderful knowledge base.
Worth:
Very worth reading
Comments:
It's really worth to browse it.
It's make the subject very strong
Comments:
This is not feed back because the ask a question form is down. I am using a <IFRAME> and I need to know the java script that I can also use so it works in Netscape!!
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
I believe this code:
onClick="window.location.href.reload()"
..is in error.
I think the correct syntax is to omit the "href" like so:
onClick="window.location.reload()"
Worth:
Very worth reading
Comments:
Hi,
I am using the script from Q337 for a dropdown menu to open pop up windows. It works great in IE5.0. I have 10 menus working in IE5.0, but will not load in Netscape 4.73. The only thing that will load in Netscape is the (G0) button. I use 40tude HTML software and have never had any problems with it.
Thank you,
Dave
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
My only gripe is that when you suggest that the visitor read an article on this site, you do not provide any link to that article.
IMO, that would be a very nice touch, and very helpful.
Worth:
Very worth reading
Comments:
It's just not as accurate or correct as the reader would like to see. The thing that's most damaging to the novice web developer is to see statments that are global or all inclusive/exclusive such as the one that was listed in this JavaScript FAQ Knowledge Base.
Here's a method that is very helpful when attempting to control the select boxes size (in #'s of rows tall) or width (in cm or mm's wide): <keep in mind the 'size' parm here is for MULTIPLE select boxes, not used for width>
<select name="PayorCode" style="width:65mm" multiple size=7>
Further note, I actually learned this on a competitor's site.
Respectfully,
JA
Worth:
Very worth reading
Comments:
It's just not as accurate or correct as the reader would like to see. The thing that's most damaging to the novice web developer is to see statments that are global or all inclusive/exclusive such as the one that was listed in this JavaScript FAQ Knowledge Base.
"Q67 How can I control the width of a select box?
You can only increase the width by padding out an entry with multiple ' '.
Alternatively you could have a dummy entry with '-------------' characters. "
Here's a method however, that is very helpful when attempting to control the select boxes size (in #'s of rows tall) or width (in cm or mm's wide): <keep in mind the 'size' parm here is for MULTIPLE select boxes, not used for width>
<select name="PayorCode" style="width:65mm" multiple size=7>
Further note, I actually learned this on a competitor's site.
Respectfully,
JA