Question:
Dear Dr. Website:
I was wondering how some pop-up windows have what appears to be a link as "close" and when you click on them they will close the window but without the IE alert message that pop ups alerting your that something is trying to close the window and you have to press yes to actually close it.
Thank you!
Answer:
The JavaScript close() function will close the browser window, and won't create the pop-up alert about closing the window--unless you are trying to close the original (parent) browser window. If you try to close that window, you will get the pop-up alert. The syntax, using a form, would be:
<form action="javascript:close()" method=POST><input type="submit"
value="close"></form>
to use a normal hyperlink, you would do it this way:
<A HREF=javascript:close()><I>close window</I></A>
Thanks,
-- Dr. Website
Question:
Dear Dr. Website:
I wonder if it's possible to let a word continues move in a circle. Just the same like you can do by PowerPoint ? And how do you do this? Is there a script for or do you have to make separated frames in gif format?
thanks,
Answer:
You can use a Java applet to accomplish that feat. It will allow you to choose the text and the background, and is easy to install on your web site. You can find the details on our site, JavaBoutique:
http://javaboutique.internet.com/CircleBanner/index.html
Thanks,
-- Dr. Website
Question:
Dear Dr. Website:
I created an ad for display on eBay using a CSS embedded style sheet. Of course, the seller does not have access to the HEAD section of the page when writing the text of his ad. And in fact eBay inserts the ad message into a single-cell table.
To my amazement the CSS formating worked --- despite being in the BODY section and inside a table. And I checked it in four different browsers (IE5, NS4, NS6, and Opera 5).
But the CSS reference authorities always tell you to embed the style sheet in the HEAD of the document.
What's the story?
Answer:
You are correct on both counts--CSS should go in the head section of a web page, BUT, it will work even if it's within the page's body. We've found that sometimes you have to use what works, and in this case it doesn't seem to hurt anything. Of course, should the browser makers decide to become more strict in how the browser renders HTML and CSS, that may not work in the future, so it's best to stick with the proper usage if you can help it.
Thanks,
-- Dr. Website
Visit
The Dr. Website® Archives.
Click here
for a list of Dr. Website's most frequently asked questions (and answers!).
Send your own question
to Dr. Website®.