Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2004, 09:46 AM
sam sam is offline
Authorized User
 
Join Date: Jun 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default multiple Image submit buttons set default to last

Hi all,
I have a form which has 3 Image-submit buttons, back - save - forwords. The problem is that if the user hits the enter key he will bo back not forwords. How do I set the forword Image-button to be the default?
Thanks,
Sam

~~~~~~~~~~~~~~~~~~~~~~~
http://byldesigns.com
~~~~~~~~~~~~~~~~~~~~~~~
__________________
~~~~~~~~~~~~~~~~~~~~~~~
       http://ebcpro.com.com
      where EveryBusinessCounts
~~~~~~~~~~~~~~~~~~~~~~~
 
Old June 30th, 2004, 11:03 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Why are you using a form for this? Why don't you just use plain images and hyperlinks?

Code:
<a href="wherever.php"><img src='back.png'></a><br>
<a href="wherever.php"><img src='save.png'></a><br>
<a href="wherever.php" id="forward_button"><img src='forward.png'></a>
<script language=javascript>
document.onkeydown=function(){catchKey;}
function catchKey()
{
 if(event.keyCode==13)document.getElementById('forward_button').click();
}
</script>
HTH,

Snib

<><
 
Old June 30th, 2004, 02:33 PM
sam sam is offline
Authorized User
 
Join Date: Jun 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

B/c it is a form with many forms and pages.
sam

~~~~~~~~~~~~~~~~~~~~~~~
http://byldesigns.com
~~~~~~~~~~~~~~~~~~~~~~~





Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a image button as default submit button toshi ASP.NET 1.0 and 1.1 Basics 1 June 1st, 2006 05:25 AM
2 Submit Buttons ... HOW? Benno Dreamweaver (all versions) 1 November 23rd, 2004 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.