Date:  12/30/2002 11:13:32 PM Msg ID:  001175
From:  FoxWeb Support Thread:  001170
Subject:  Re: Submit button problems
I can think of three ways to solve your problem:
 
1. You can change the appearance of submit buttons by using stylesheets.  For an example, take a look at the buttons in the FoxWeb Forum's Home and User Settings pages.
 
2. You can also use <input type="image" name="submit"> to use an image for your button.  In this case you will receive the x and y coordinates of the click. For example: Request.Form("submit.x") = "34" and Request.Form("submit.y") = "82".
 
3. A third option would be to use the onclick clause to set the value of a hidden field:
 
<form name="myform">
<input type="hidden" name="submit" value="0">
<span onclick="document.myform.submit.value='1';document.myform.submit()">
<img src="/images/submit.gif">
</span>
</form>
 
In this case if the user clicks on the code between the span tags the submit field will be set to "1".  Obviously, you can use anything you want between the span tags, including text and images.
 

FoxWeb Support Team
support@foxweb.com email

Sent by Alan Harris-Reid on 12/27/2002 09:00:13 AM:

I want to have a submit button on a form, and when submitted, I want to be able to retrieve data from the called page as to whether it was called from the button press or via another method (eg. if 'enter' was pressed).
Ideally I would like to use a button created using [input type="submit" name="submit" value="Report"], as the name/value pair are posted to the next page.  The problem with the resulting button is that I cannot see any way to change font, size or color of button text, so I am limited to a very boring-looking button.  Is there any way around this?  I tried changing the font attributes of the table cell containing the button, but the button still looked the same.
 
To solve the appearance problems I could create the button using [button]...[/button] tags, but the problem this is that the posted value is always the same, whether the button was pressed or not, so I cannot tell if the button was pressed to access the next page.  Also, the posted value contains all sorts of useless information regarding font size, type, etc. - I only want the value="..." text.
 
Any help would be appreciated.  I would prefer a plain HTML solution if possible, but failing that, a Javascript solution would do.
 
TIA,
Alan
 
PS. I have used square brackets only for display purposes so that the text in-between is not interpreted as HTML!