Goodies to Go ™
June 16, 2003–Newsletter #237
This newsletter is part of the internet.com network.
http://www.internet.com
- Featured this week:* Goodies Thoughts – WebsiteReviews, Round Two* Q & A Goodies* News Goodies* Goodies Peer Reviews
- * Feedback Goodies * And Remember This…
- Goodies Announcement
- Q & A Goodies
- Company ABC
- of the so only the imagesshows through, but the text will be readable if the browser can’t handle thestyle sheet. Q. how can iget rid of this error:document.form1.field.value has no properties.I have tested in ie6, nn6, and nn4, and nn4 is the only browser that gives methis error. what can i do to get rid of it?function validate(){if(document.form1.field.value.substring(0,3)=="adv"){document.form1.action="updateadvisor.asp"}if(document.form1.field.value.substring(0,3)!="adv"){document.form1.action="updatestudent.asp"}document.form1.submit()}method="post">advisor: person1advisor: person2delegate: person3delegate: person4alternate: person5presenter: person6presenter: person7onClick="js:validate()">A. Netscape 4 version browsers require that you specify the selectedIndex to get the value of the option selected. Try changing your function tothis:function validate(){ num=document.form1.field.selectedIndexif(document.form1.field.options[num].value.substring(0,3)=="adv"){document.form1.action="updateadvisor.asp"}if(document.form1.field.options[num].value.substring(0,3)!="adv"){document.form1.action="updatestudent.asp"}document.form1.submit()}I would also recommend that you change the onClick event in your input button toremove the "js:" like this:You don’t need it and it could cause some problems. Q. I can never get an image flip to work. I try to do more than one flipon a page, but it only flips one picture, and the rest remain the same. Also,when I put on picture in, it was replaced by another picture. Then, when I putmy mouse over another, it changes, but it changes to the red X in the whitesquare, when I’ve quadruply checked to see if it was there. I just can never getit to work. Any suggestions?A. The best I can do is give you an example of one way to accomplish it.Here it is:Image Flipfunction flip(img,imgn){document.images[imgn].src=img}(‘0.gif’,’pica’)">(‘2.gif’,’picb’)">You will notice that when I mouse over the image it passes to the function theimage to display and the name of the img tag that I want to affect. The functioncalled flip is rather simple in that it uses the image array to change the imageby specifying the name of the image tag. TopNews Goodies
- Top
- And Remember This . . .
Featured this week:
* Goodies Thoughts – Website
Reviews, Round Two
* Q & A Goodies
* News Goodies
* Goodies Peer Reviews
* Feedback Goodies
* And Remember This…
Goodies Announcement
Just in case you missed
it before, the new Beyond HTML Goodies book is now available!
Go beyond the basics
and learn how the pros add and use dynamic HTML features and advanced
JavaScript techniques. Beyond HTML Goodies demonstrates dozens of new and
different features readers can add to their existing Web pages using HTML and
JavaScript. The book starts with simple text and image tips, such as adding a
clock to a Web page or causing text to appear when the mouse moves over an
image. It gradually builds to more complex tricks, including manipulating forms
or working with cookies behind the scenes. Throughout the book, readers enjoy
Joe’s snappy style and “to the point” discussion of each “goody” in the book.
http://books.internet.com/books/0789727803
Goodies Thoughts – Website Reviews, Round
Two
A few months ago, we started the Goodies Peer Reviews program. It all began with
a suggestion from Peter Mole from Australia. It was such a great idea that we
asked you about it, you responded with an overwhelming "YES!", so we put a
program together and implemented it last March. There was an immediate surge of
activity, as we would expect, followed by a slow down — also as we would
expect. Then we started to notice a few things.
The biggest difficulty we seem to need to resolve relates to the reviews
themselves. When we put together the program, we had decided to allow a sort of
"free form" format to them, providing you with the flexibility to create a
review structured as you see fit. Unfortunately, this has led to the majority of
the "reviews" coming in as single paragraph, or even single sentence, comments.
This is not exactly what we had in mind!
When I commented a few weeks ago about the small number of actual reviews we
were receiving, we received feedback that highlighted three things. First, you
like the program and don’t want it to go away. Great – it won’t! Second, there
are a lot of you out there who would like to write a review but either feel you
don’t have enough technical skill yourself, or don’t know what format a review
should take, and third, we have not done an adequate job of letting you know how
this program is supposed to work, and how you can participate.
To address these last two issues, we have created new guidelines and added a
review template. We had written a few, cursory guidelines, but nothing of any
great substance. We now have a comprehensive set of instructions, a decent set
of guidelines and a review template for you to download and use as the basis for
your review. These are all due to be added to the website this evening – if
they’re not there when you look, come back in the morning and find them!.
We have made a couple of changes to the requirements for the emails you send in,
specifically regarding the subject lines. We need this for identification
purposes. Please pay careful attention to these requirements. We receive a ton
of email every day and this is the only way we can identify that you are
involving yourself in the Goodies Peer Review process.
Before I close, I want to encourage you to participate in this program. One of
my favorite expressions is "you teach best what you most need to learn." By
helping others, we learn a lot ourselves. If, on the other hand, you feel that
you don’t have the expertise to help somebody else along, let me ask you this:
do you know what you like? If you do, you have everything you need! Check out
the review template — you will see that you could easily fill it out for any
website you visit. Reviews don’t need to have lots of technical content — if
they do have it, that’s fine too. The most valuable aspect of a review is that a
fresh eye will see the site differently than its author, and can help the author
to create a site that is what their audience likes and can use. In return for
your efforts, we provide some free publicity for you and your site on one of the
web’s most popular web developers’ sites. Some people have been quite surprised
by what a little HTML Goodies exposure can do!
Hear that bell? That’s the Goodies Peer Reviews round two starting! Check out
the website!
Thanks for Reading!
– Vince Barnes
Top
Q & A Goodies
Questions are taken from submissions to our Community Mentors. You can ask a Mentor a question by going to
https://www.htmlgoodies.com/mentors.
Q. I’m out of work & learning Javascript to improve my skills, running
W2K, IE 6.0. Periodically when I try to use the sample exercises, I get an error
message saying that an object was expected. Here’s an example:
". In this
particular case have the script at the end of your document is ok, but in most
cases you should place it in the head section of your document. Good Luck on
your quest to learn new skills.
Q. Im trying to make one of those websites where you can change the
whole color-scheme of the site by clicking a link. I know Im probably going to
have to use PHP with CSS, my main question was concerning images. How do I
insert an image using an External Style Sheet. I have a few images that I want
swapped in and out, depending on which style-sheet is applied to the site. Is
that possible? If so, how can I achieve it?
A. A good reference for style switchers is http://www.alistapart.com/
They have a few articles about this. Changing images can be a little tricky,
especially concerning older browsers. You may want to test this method on your
local site before going live.
The style sheet cannot add images using the tag, but it can add background
images to almost any block element, like
,
- etc.
If my business, Company ABC, has two different style sheets with different color
schemes, I might want to use different color logos. I would do something like
this in my HTML:
Company ABC
and add different code in my styles…
………. in file redstyle.css :
div#header {
background: url(redlogo.gif) no-repeat;
height: 50px;
wisth: 200px; }
………. in file bluestyle.css :
div#header {
background: url(bluelogo.gif) no-repeat;
height: 50px;
wisth: 200px; }
………. and in both files:
div#header h1 { display: none;}
When the styles are switched, the background image in the "header" div is
changed, creating the illusion of different images on the page. The "display:
none;" atttibute hides the text in the
of the so only the images
shows through, but the text will be readable if the browser can’t handle the
style sheet.
Q. how can i
get rid of this error:
document.form1.field.value has no properties.
I have tested in ie6, nn6, and nn4, and nn4 is the only browser that gives me
this error. what can i do to get rid of it?
shows through, but the text will be readable if the browser can’t handle the
style sheet.
Q. how can i
get rid of this error:
document.form1.field.value has no properties.
I have tested in ie6, nn6, and nn4, and nn4 is the only browser that gives me
this error. what can i do to get rid of it?