internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










D R .   W E B S I T E®
WebDeveloper.com

May 10, 1999

Neat Mouseover Tricks; Pop-Up Browser Windows

By David Fiedler and Scott Clark
Dear Dr. Website®: There are some sites out there that use onMouseOver. How can I get a form button to change when I have the mouse move over it?

I can provide an Internet Explorer-specific solution. The mouseover doesn't work in Navigator, but everything else does.


<SCRIPT LANGUAGE="JavaScript">
function doit(){
alert('Welcome');
}
</SCRIPT>
<FORM NAME="myform" METHOD=POST ACTION=javascript:doit()
NAME="jump">
<INPUT Type=TEXT Value=""><BR>
<INPUT TYPE=IMAGE SRC="ad1.gif" VALUE="Go"
onMouseOver=this.src='ad2.gif';
onMouseOut=this.src='ad1.gif';>
</FORM>

The problem in Netscape is that it doesn't recognize the image as an image, but as a form button.

Dear Dr. Website®: I have many "image" links, but they are text images. Is there a script that would make them become 3-D, or pop out, when you pass the mouse over them, instead of changing color?

The solution is to create 3-D or pop-out versions of all your text images, remembering to keep the file size and number of colors down to a minimum. Then you can use our Preloader/Mouseover Code Generator or one of your own mouseover scripts to change the normal text image to the pop-out versions when the mouse is passed over the image, and back to the normal image when the mouse is no longer over the image.

Dear Dr. Website®: I want to have a group of files users can download from my site. How can I do this?

Create a hyperlink to the files the same way as to an image, i.e.:

<A HREF="myfile.exe">this is a link to download myfile.exe</A>

Navigator and Explorer will automatically pop up a dialog box asking users if they wish to save the file and where they'd like to put it. If the files you wish to allow visitors to download are some strange extension, you'll have to add the MIME type to your Web server. We had this problem with large files with a .01 or .02 extension, and adding the MIME type to our Web server solved the problem.

Another solution if you don't have access to your server's configuration files is to tell visitors to hold down the Shift key as they click the link, if they are using Navigator. If they are using Explorer, they should right-click on the link and select "Save As," which will let them save the file rather than displaying it in the browser.

Dear Dr. Website®: How can I create pop-up windows (a new browser window) off a link on my sites?

You would want to try something like this:


<SCRIPT LANGUAGE="JavaScript">
<!--//
function openit(sURL){
newwindow=open(sURL,"newwin",
"scrollbars=no,toolbar=no,directories=no,menubar=no,
resizable=no,status=no,width=450,height=300");
}
//-->
</SCRIPT>
<a href="javascript:openit('yourpage.html')">Your Page</A>

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®.

Fast Jump to Anywhere on WebDeveloper.com®:


Contact the WebDeveloper.com® staff

Last modified: 20

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
VRML / 3D
XML



The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers