...

View Full Version : How display "Form" submit button similar to a link



roadrunnerray
12-07-2005, 11:00 PM
I have used many forms on my web site and would like to display the "submit" button in a fashion similar to a link, is this possible??

Thanks for any thoughts............Ray

mark87
12-07-2005, 11:28 PM
Just use a link instead of a button then...

<a href="#" onclick="javascript:document.formName.submit()">Submit</a>

roadrunnerray
12-08-2005, 12:04 AM
Hi Mark, many thanks, I will try this tomorrow morning..........Ray

roadrunnerray
12-08-2005, 12:14 AM
Hi again mark87, had a chance to try it before I left the office and it worked like a charm! This bit of knowledge will sure help when I redesign my web pages.........Many thanks, Ray

mark87
12-08-2005, 12:43 AM
No problem. :)

Remember this relies on javascript being enabled though (which most people do, but you may get the odd few who don't). You have to really weigh up the advantages of using a link instead of a button, against the price of excluding non-javascript-enabled users.

roadrunnerray
12-08-2005, 04:58 PM
I may have spoke a bit too soon, the link displays great and sends me to the xsl action page designated but the form coding does not execute. Here is the form I am using:

====================================================
<form method="post" name="Events" onSubmit="showStatus()">
<xsl:attribute name="action">event_reg_test.xsl</xsl:attribute>
<input type="hidden" name="-db" value="Web_TA_Event_DB"/>
<input type="hidden" name="-lay" value="Event Web"/>
<input type="hidden" name="-sortfield.1" value="EventStartDate"/>
<input type="hidden" name="-script.presort" value="EventDateTest"/>
<input type="hidden" name="-token.error" value="confirm_events.xsl"/>

<input type="hidden" name="-token.participantid"
value="{$default-record/fmrs:field[@name= 'ParticipantID']/fmrs:data[1]}"/>
<input type="hidden" name="-token.fullname"
value="{$default-record/fmrs:field[@name= 'FullName']/fmrs:data[1]}"/>
<input type="hidden" name="-token.status"
value="{$default-record/fmrs:field[@name= 'Status']/fmrs:data[1]}"/>
<input type="hidden" name="-token.participantidq"
value="{$default-record/fmrs:field[@name= 'ParticipantIDQ']/fmrs:data[1]}"/>
<input type="hidden" name="-max" value="50"/>

<a href="#" onclick="javascript:document.Events.submit()">Registration</a>
</form>
=======================================================

Any assistance will be greatly appreciated.............Ray

roadrunnerray
12-08-2005, 11:29 PM
The XML file created when clicking the form link has an error code 958, it seems the web publishing engine is having a problem parsing the XML file created:

====================================================
<fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0">
<error code="958"/>
<product build="08/12/2004" name="FileMaker Web Publishing Engine" version="7.0v3"/>
<datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/>
<metadata/>
<resultset count="0" fetch-size="0"/>
</fmresultset>
====================================================

Any assistance will be greatly appreciated..........Ray

mark87
12-08-2005, 11:32 PM
You may get a better response in the XML section. As you pointed out yourself, it's not a problem with the submit link. :)

roadrunnerray
12-08-2005, 11:52 PM
Thanks again Mark87, I will pose the question to the XML forum...Ray



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum