Robert Hess
Download the code (1KB)
GEEK How do I script two simultaneous events for the DHTML onmouseover event? My current code (below) is in black and simply changes the class of the object on rollover. I'd also like to display a message in the status bar from the same event. The code in green (proper syntax notwithstanding) is what I would like to add. Any ideas? This didn't work: |
<DIV ID="html" STYLE="position:absolute; top: 100px; z-index: 0">
<P><A HREF="html.htm"
CLASS = "offmed" TARGET="main"
ONMOUSEOVER = "this.className ='onmed';"
"window.status = ' Websites I developed using HTML...' ; return true;"
ONMOUSEOUT = "this.className = 'offmed';">Website Development</A></DIV>
Neither did this:
<DIV ID="html" STYLE="position:absolute; top: 100px; z-index: 0">
<P><A HREF="html.htm"
CLASS = "offmed" TARGET="main"
ONMOUSEOVER = "this.className ='onmed';"
ONMOUSEOVER = "window.status = ' Websites I developed using HTML...' ;
return true;"
ONMOUSEOUT = "this.className = 'offmed';">Website Development</A></DIV>
GEEK You can't assign more than one onmouseover to a single object, but you should be able to bubble multiple onmouseover events through contained objects. Here is an example I worked up to demonstrate this:
<html>
<body bgcolor=white>
<div onmouseover="window.status='Just A Test'"
onmouseout="window.status=''">
<span onmouseover="this.style.background='yellow'"
onmouseout="this.style.background='white'">
This is a test
</span>
</div>
</body>
</html>
GEEK I am developing a Web site using Active Server Pages (ASP) and SQL Server . One of the text fields that I will need to capture can exceed 32KB, but that's the limit on a standard textarea. Since you can't specify a width of 100 percent on a textarea, the control seems very limited. Is there a cross-platform, cross-browser alternative?GEEK In a recent response to an "applet as a body background" question, I was surprised that you didn't suggest using an animated watermark background image. By grabbing a few screen shots of http://www.isbiel.ch/~troxp/java/apl/Snow/e.html, I created a quick animated snowing GIF using Microsoft Image Composer. I then loaded an HTML page with the following:
<HTML>
<BODY BACKGROUND="snowing.gif" TEXT=#FFFFFF>
<H1>This is a test<H1>
<H3>of the snowing GIF background<H3>
</BODY>
</HTML>
GEEK I was prevented from offering a suggestion like this due to built-in safeguards within my Web page design algorithms. In fact, I now need to do a quick reboot just to clear this from my memory!
GEEK Is there any way that I can add a script to automatically invoke the full-screen mode on Internet Explorer 4.0 when a user visits my Web site?
GEEK Earlier versions of Internet Explorer had a scriptable explorer object that provided a fullscreen property. Because of concerns that this and some other explorer object features could be used to play tricks on users' machines and thus fall into the realm of a security issue, this object was removed.
To switch to a full-screen view on the browser, you essentially need to launch a new instance of the browser and start it out in full-screen mode (see Figure 1). Note that not only am I opening a new full-screen window, but in the old window I am also displaying information as to what I am doing. I could have invoked the window.close method to close this first window, but that results in a message box to the user alerting them that a script on the page is trying to close the window. My preference would be to instead utilize the first window to provide some sort of information to the user.
GEEK How can I have people choose a URL from a dropdown list and press a button to take them to it? I have to provide these pages to college administrators, and we're not allowed to run any server-side components.
GEEK With the strictly client-side restrictions you state, the following should suit your needs nicely. This will work on the latest versions of Microsoft Internet Explorer or Netscape Navigator:
|
GEEK I have been using Microsoft Image Composer 1.5 for a while now. Every time I use a font within a design, the font always looks terrible (fuzzy) when I view the final image on a Web page. How can I get good-looking fonts like I often see on the Web? GEEK The issues you are running into have to do with four slightly separate aspects of images.
I did a fairly detailed writeup about the safety palette some time ago for Microsoft SiteBuilder:http://msdn.microsoft.com/workshop/design/color/safety.asp This explains the problem and talks you through the solution. The article contains a GIF file whose palette contains only the 216 colors of the safety palette. You can use that image to build a .pal file with most image tools. Note that Image Composer and most other high-end image tools will utilize special gamma correction, which in most cases keeps you from making an image exactly match a palette without a lot of magic. Fortunately, Image Composer 1.5 provides built-in support for the safety palette. From the View menu, select Color Format which will allow you to select from "True Color," "Gray Ramp," "Web dithered," and "Web solid." This is a better way to create images that utilize the safety palette. The only drawback is that there isn't any (easy) way to combine both dithered and solid components into a single image. I personally use both Microsoft Image Composer and JASC Paintshop Pro (http://www.jasc.com). Image Composer does a wonderful job at sprite manipulation, color blending, and effects, and it allows me to create great looking graphics. However, it isn't a tool for bit-level manipulation of images. So I often build up the image in Image Composer, then copy it over to Paintshop Pro for final tweaking before saving it out as a GIF file. Paintshop Pro allows me to fix up any pixel-level anomalies in the images and force it to conform to the safety palette. This level of image manipulation can be rather tricky and it takes practice. GEEK I was reading a recent geektogeek and have a question regarding one of the questions. One geek was berating you for erroneous information and said that the statement |
|
works in Internet Explorer. I have found that it works fine if myField is of type text. If it is a submit button, I get an error message saying the method is unsupported. This seems to happen only in Internet Explorer, not Netscape Navigator. GEEK The problem you are running into is that the focus method in Internet Explorer 3.x was only defined for the radio, password, text, and select elements of a form. In Internet Explorer 4.0 form elements the focus method is exposed for everything except for hidden or label elements.
GEEK I'm trying to populate a combobox in my ASP code with a list found in a field in a Microsoft Access database. Microsoft FrontPage 98® makes it very easy to stick controls like dropdown comboboxes and listboxes on a page, but provides almost no useful information on how to use them. Why can't using these controls be as easy as using the same or similar controls in Microsoft Access or Microsoft Excel? |