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>