
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
Simulating a Form Submit ButtonBy Will Bontrager Form submit buttons are limited in design choices. For example, suppose you want to put a smiley on the button that changes expression when it's clicked. And sometimes an actual submit button is not the most elegant implementation, even when an available button design is appropriate. Here is how to simulate a submit button within an <A... link tag. You'll need two images. One image will display when the page loads. The other will display when the image link is clicked on. For code example purposes, let's call the two images original.jpg and alternate.jpg, respectively. The example code below contains a block of JavaScript to preload the alternate.jpg image. And it contains an HTML image link.
In the above code, replace
If you intend to implement more than one instance on a page, replace Here is an example (not linked to anywhere for easier demonstration of the click image changeover):
The above is used at our Bontrager Connection, LLC central business web site for the "I'm feeling lucky, send me to a popular page!" feature. July 16, 2006 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|