How to use Spry validation with link styled submit buttons..??

I'm working with a theme package that comes with a bunch of button styles that work with basic links.  For example:
<a href='page.html' class='small-button smallblue'><span>Button Label</span></a>
I've got a basic form setup with Spry validation, but the submit button needs some styling to make it look nice with the site.  Since there are already styles ready for me to turn links into buttons I figured I'd use the same thing for my submit buttons.
To accomplish that, I'm using the following javascript...
<script type="text/javascript">
function submitForm() {
    document.getElementById("form_name").submit();   
</script>
And then I'm updating my submit button to something like this...
<a href='javascript: submitForm()' class='small-button smallblue'><span>Button Label</span></a>
When I do this, the form submits as expected, but the Spry validation doesn't work.  Is there a way I can make the Spry stuff work with these types of buttons?  I know I could create separate styles for the submit buttons themselves, or I could use an image type button, but I'd really like to figure out how to get these existing styles to work for me since the theme already has so many of them done for me.
Any information on this would be greatly appreciated.  Thanks!

Save yourself a lot of trouble and style the normal submit button as per
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<style>
.Standout {
    font-family: Geneva, Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: #FFFFFF;
    font-size: 16px;
    background-color: #CC0000;
    font-weight: bold;
    border-style: none;
    padding-top: 6px;
    padding-bottom: 5px;
    padding-right: 64px;
    padding-left: 64px;
    letter-spacing: 1px;
.Standout:hover {
    background-color: #000000;
</style>
</head>
<body>
<form action="" method="get" name="myform">
  <span id="sprytextfield1">
  <label for="text1"></label>
  <input type="text" name="text1" id="text1">
  <span class="textfieldRequiredMsg">A value is required.</span></span>
  <input name="input" type="submit" class="Standout">
</form>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
</script>
</body>
</html>
Gramps

Similar Messages

  • Use Spry Validation with jQuery Form to Form Wizard (v1.1)

    I am trying to use spry validation widgets with jQuery Form to Form Wizard script found here http://www.dynamicdrive.com/dynamicindex16/formwizard.htm
    This is a script that makes a long form into a multi part wizard/form with next and back buttons.
    for the most part it works with the spry widgets on blur and onsubmit, but to make it work properly the next buttons of the script should be disabled until the user corrects what has caused spry error messages.  The script creator has made onpagechangestart event handler to allow for this.  Description here http://www.dynamicdrive.com/dynamicindex16/formwizard_suppliment.htm. By returning false from this event handler, you disable the user's ability to go on to the next page until a value of true is returned.
    How can I script for Spry validation to return false if it has errors from this event handler?
    Thanks in advance for any help,

    did you check this example:
    http://labs.adobe.com/technologies/spry/samples/form_submission/Submit_and_Validate_Form.p hp.html

  • How to use Spry Validator without get all fields required

    Hi,
    I have a problem with a form were i use Spry Validator i want only 4 fields to be required but now all the fields are required and i don't know why.
    Thanks for your help!

    I get finally my answer by using this tutorial :
    http://www.youtube.com/watch?v=EdkQUEpLHdk
    Have nice day!

  • How to use PDF files with links to other PDF Files

    How to use a PDF file with links to other PDF files that have been transferred to the same folder

    Are you using a mouse, or a trackpad on a laptop? Either way, your cursor is usually an arrow, right? And presumably it's working/moving MOST of the time, otherwise you wouldn't be able to do anything?
    For example, can you move the cursor arrow to the "Annotate" tool to click on it and go into Annotate mode? If so, can you click on the text tool? If so, does the cursor change to a crosshairs? At what point can you NOT move the cursor around the screen?
    Matt

  • How to use object collection with linked objects

    <p>Hi,</p><p>I&#39;m using VS2005 Crystal reports in a c# client app (server has database, but client does not have!). So the use of the objects transfered to the client seemed to me a good solution for showing reports on the client. The objects mostly link to several other objects (properties of type <type> or properties of type [] <type>) and the links are correctly configured in database assistant.</p><p>But: Whenever using one of the linked fields, all of the main fields will never show up in the report.</p><p>So, what is the correct way of showing a master / detail report using linked object collections???</p><p> (A small test sample app can be provided upon request)</p><p> TIA</p><p>BP</p>

    What database and connection type are you using? Are you connecting the report directly to the database, or trying to assign the datasource to object data?
    It sounds like you might be trying to use a linked list, collection or other C# construct to pass your data in. This currently isn't supported by the Crystal Reports SDK. You can use a DataSet or a DataTable, and possibly also an IDataReader depending on which version of Crystal Reports you're referencing in your project. Of course you can also connect directly to the database, even if the database isn't on the same machine as the application.
    The way to show master records with detail information is through the use of subreports and linked subreport parameters. Linked subreports take their parameter value from a record in the main report, so that only the data appropriate to that master record is displayed. The guys over in the [report design|SAP Crystal Reports; forum can help you out with this if you have questions on the specifics.

  • How to use standard validator with custom component?

    Hi folks!
    I've implemented a custom component extending UIInput. My component worked well but now I want to use a standard validator.
    How can I use it??
    regards,
    Steven

    Validation is done by UIInput.validate() which is invoked by processValidators().
    So, if you don't redefine these inherited methods they will invoke the
    corresponding validators.

  • How to Use Switch Statement with Exclusion Group (radio buttons)?

    Wouldn't you know, just when I though I'd really be making progress, I've come across another problem I can't solve. In a homeowners insurance application I am building, there is an exclusion group that needs to set the value of several variables
    I have setup in the form properties/variables. These variables take on different values depending on the users choice.  For the exclusion group, in the object pallet, I have set the binding to normal, and have checked the "Specify Item Values" check box. Also the values for the choices have been assigned 1,2,3,4,5.
    Here is my code for the change event fir the exclusion group (This is exactly what I have tried). For now, the values for the variables to take on in the different cases, are completely arbitrary.
    switch (this.change.rawValue)              // I have tried so many things here
        case "1":                                        // I have tried the caption, single quotes in all combinations
            addLivingExp = "1";
            damageOthersProperty = "2";
            liabilityIncl = "3";
            maxCoverage = "4";
            minCoverage = "5";
            persProperty = "6";
            relatedPrivateStruct = "7";
            break;
        case "2":    
            addLivingExp = "10";
            damageOthersProperty = "20";
            liabilityIncl = "30";
            maxCoverage = "40";
            minCoverage = "50";
            persProperty = "60"
            relatedPrivateStruct = "70";
            break;
        case "3":    
            addLivingExp = "100";
            damageOthersProperty = "200";
            liabilityIncl = "300";
            maxCoverage = "400";
            minCoverage = "500";
            persProperty = "600"
            relatedPrivateStruct = "700";
            break;
        case "4":    
            addLivingExp = "1000";
            damageOthersProperty = "2000";
            liabilityIncl = "3000";
            maxCoverage = "4000";
            minCoverage = "5000";
            persProperty = "6000"
            relatedPrivateStruct = "7000";
            break;   
        case "5":    
            addLivingExp = "10000";
            damageOthersProperty = "20000";
            liabilityIncl = "30000";
            maxCoverage = "40000";
            minCoverage = "50000";
            persProperty = "60000"
            relatedPrivateStruct = "70000";
            break;   
        default:   
            minCoverage= 5;   
            break;
    There must be something obvious I am missing? Eternally grateful for advice on this.
    Stephen

    There are two issues in this script:
    1. You are not using the accessor 'value' to set form variables
    2. You are not correctly getting the value of the radio button list in the switch clause
    Please see the working script below.
    Ben Walsh
    www.avoka.com
    switch (this.rawValue) 
        case "1":                                       
            addLivingExp.value                  = "1";
            damageOthersProperty.value   = "2";
            liabilityIncl.value                      = "3";
            maxCoverage.value                 = "4";
            minCoverage.value                  = "5";
            persProperty.value                  = "6";
            relatedPrivateStruct.value        = "7";
            break;
        case "2":   
            addLivingExp.value                  = "10";
            damageOthersProperty.value   = "20";
            liabilityIncl.value                     = "30";
            maxCoverage.value                 = "40";
            minCoverage.value                  = "50";
            persProperty.value                  = "60"
            relatedPrivateStruct.value        = "70";
            break;
        case "3":   
            addLivingExp.value                 = "100";
            damageOthersProperty.value   = "200";
            liabilityIncl.value                     = "300";
            maxCoverage.value                 = "400";
            minCoverage.value                  = "500";
            persProperty.value                  = "600"
            relatedPrivateStruct.value        = "700";
            break;
        case "4":   
            addLivingExp.value                  = "1000";
            damageOthersProperty.value   = "2000";
            liabilityIncl.value                      = "3000";
            maxCoverage.value                 = "4000";
            minCoverage.value                  = "5000";
            persProperty.value                  = "6000"
            relatedPrivateStruct.value        = "7000";
            break; 
        case "5":   
            addLivingExp.value                  = "10000";
            damageOthersProperty.value   = "20000";
            liabilityIncl.value                      = "30000";
            maxCoverage.value                 = "40000";
            minCoverage.value                  = "50000";
            persProperty.value                  = "60000"
            relatedPrivateStruct.value        = "70000";
            break; 
        default:  
            minCoverage.value                 = 5;  
            break;

  • How to Use Spry to Validate Radio button

    How to use Spry Validation for radio button?
    The samples only have checkbox, text, select and textarea.
    Thanks

    I needed to add radio buttons to the live (non-destructive)
    filter so users could choose which column they wanted to search
    data from. Its been modified from the "contains CB" but works
    nicely. It also had to rebuild table when another button was
    selected. I'll post some code if anyone would like to use it....
    The Form area -
    <form name="filterform">
    Data Filter: <input type="text" id="filterTF"
    onkeyup="StartFilterTimer();" />
    <input type="radio" id="containsCB" name="radio"
    value="module" onclick="resetfilter();" checked /> by Module
    <input type="radio" id="containsCB" name="radio"
    value="oper" onclick="resetfilter();" /> by Oper
    <input type="radio" id="containsCB" name="radio"
    value="phone" onclick="resetfilter();" /> by Phone
    <div id="radiovalue"></div>
    </form>
    The JS area -
    function FilterData()
    var tf = document.getElementById("filterTF");
    for (var c=0; c < document.filterform.length; c++)
    if (document.filterform[c].checked)
    var choice = document.filterform[c].value;
    if (!tf.value)
    // If the text field is empty, remove any filter
    // that is set on the data set.
    dsRows.filter(null);
    return;
    // Set a filter on the data set that matches any row
    // that begins with the string in the text field.
    var regExpStr = tf.value;
    regExpStr = "^" + regExpStr;
    var regExp = new RegExp(regExpStr, "i");
    var filterFunc = function(ds, row, rowNumber)
    var str = row[choice];
    if (str && str.search(regExp) != -1)
    return row;
    return null;
    dsRows.filter(filterFunc);
    function StartFilterTimer()
    if (StartFilterTimer.timerID)
    clearTimeout(StartFilterTimer.timerID);
    StartFilterTimer.timerID = setTimeout(function() {
    StartFilterTimer.timerID = null; FilterData(); }, 400);
    function resetfilter() {
    // var tf = document.getElementById("filterTF");
    // var tfval = tf.value;
    document.getElementById("filterTF").value = "";
    StartFilterTimer();

  • How to use the validations and exceptions  in BPEL

    Hi,
    How to use the validations and exceptions in BPEL.
    pls provide one sample example to give the exceptions and validations in BPEL

    Hi,
    For example you can create a simple BPEL Process and you can throw an error during running process. If input data is not valid and format is not correct you can throw error using throw activity and using catch activity you can catch particular error. The catch-all will handle all the error occurred with the scope.
    you can also refer faulthandling section in the link for more information related to exception handling.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/faults.htm#sthref1188
    Regards,
    Deepa

  • How to use File Adapter with hierarchial Structure?

    Hi,
    How to use File Adapter with hierarchial Structure like..
    Data:
    --Header Details:
    Line Item Details:
    Data
    Bcoz I am getting a Flatfile in a hierarchial way as shown below.
    Header Details :1
    Line Item a
    Line Item b
    Header Details :2
    Line Item c
    Line Item d
    Kishore

    Hey Kishore,
    In order to create a structure you need to use the file with convertion mode on the sending communication channel of the file adapter.
    check the link for the needed configuration paramters.
    If the structure is more complexed you can use the Contetnt master(CM) from itemfield which allows to ceate XML file from complex flat files and more.
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm">File sender adapter</a>
    If you have any question i'll be more than happy to assist.
    Nimrod Gisis

  • How to do file validation with ODI 10.1.3.5

    Hi Team,
    Please help me, how to handle file validation with ODI?
    My source is files.
    Requirement:
    With ODI i have to do the file validation and file data loading successfully. Once it is successfully done then i have to move the particular file and move to different directory.
    Any internal tool is there in ODI package to watch the file.
    Regards,
    Suresh

    Hi Suresh,
    You can do your file loading and validation in an ODI interface.
    Once you are done with the interface, add it to a package, you can set up subsequent steps in the package to move the file to another location using the built in ODI file utilities in the package.
    Terrence.

  • How to use NODIM func with out it's values being rounded

    I created a new calculated key figure in Query Designer 3.x, and used the function NODIM() - Value with out dimensions. When I use this function, the values are rounding off to the nearest value.
    For example, I have a value 0.000075 US$, when I use NODIM function the value is displayed as 0.000080. Value is getting rounded to nearest value.
    I tried using absolute value it did not work.
    Can any one tell me how to use NODIM function with out it's value being rounded to nearest value.
    Thanks,

    Hi,
    According to your description, you might want that "Notice" field has a default value when form is created and users can be able to change the value of that
    field.
    As a workaround, you can add an action rule in “Name” field via InfoPath to fill the default value in “Notice” field only when “Name” field is not blank and “Notice”
    field is blank.
    Settings of the rule are as below, you can modify it based on your need:
    Here is a link about how to add an action rule in InfoPath form, you can use it as a reference:
    https://support.office.microsoft.com/en-us/article/Add-rules-for-performing-other-actions-5322d726-b787-4e5f-8d37-ba6db68b451d?CorrelationId=8a64c12f-aa60-4d90-b1f9-a44fcc4e74b5&ui=en-US&rs=en-US&ad=US
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to use bounding theme with jdbc theme

    Hello
    I'm using oracle maps javascript API to locate geometry with jdbc theme based foi, so how to use bounding theme with jdbc theme? Give me help, thanks.

    Hi,
    You can find some information & code samples at this link :-
    http://download-west.oracle.com/docs/cd/B19306_01/java.102/b14355/xadistra.htm#g1077100
    Regards,
    Sandeep

  • How to use track effects with new version of GarageBand

    In the version of GarageBand before this one, you could access different effects that you could manage and apply to the different tracks.  Each track had an area containing its set of effects that were either activated or deactivated.  With this removed, i am not sure how to add those same kind of effects.  I am aware of the new nobs that are provided in order to mix and edit trebles, bass, mid, etc., but i want to be able to add different effects such as voice transformer, flanger, chorus, speech enhancer, bit crusher, bass amp, track echo, track reverb, amplifier, etc.  I desperately need help finding out how to do this, as this was a major part of my mixing and producing with GarageBand, and without these given effects, i do not feel as comfortable using GarageBand.

    zachseiden wrote:
    How to use track effects with new version of GarageBand
    this may help:
    http://www.bulletsandbones.com/GB/GBFAQ.html#replacemissingtrackeffectsgbv10
    This FAQ entry offers a Minute GarageBand video tutorial
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How to use spry on DreamWeaver Mac?

    ive been searching the web on how to use spry on the mac but i am unable to use it for some reason. HELP?!

    Hello,
    I quote from different contributions of the forum:
    "Spry has been deprecated and is no longer officially supported by Adobe", “Adobe abandoned Spry late last year after CS6 came out. Future products will probably not contain any Spry so learning to use jQuery is a valuable skill to have for the future.” “The news was released in August last year:
    http://blogs.adobe.com/dreamweaver/2012/08/update-on-adobe-spry-framework-availability.htm l”
    and: "All Spry framework related examples available here: http://adobe.github.com/Spry/samples/
    You may want to take a look at it. I'd recommend you switch to a jQuery library for your further requirements.
    Examples
    http://users.tpg.com.au/j_birch/plugins/superfish/examples/
    http://www.egrappler.com/a-stylo-modern-jquery-accordion-akordeon/
    http://craigsworks.com/projects/simpletip/
    http://calebjacob.com/tooltipster/
    http://www.solutions4website.com/Extensions/nova_dropdown_menu.aspx
    Tutorials:
    http://speckyboy.com/2012/08/29/10-responsive-navigation-solutions-and-tutorials/
    http://try.jquery.com/
    http://learn.jquery.com/
    https://tutsplus.com/course/30-days-to-learn-jquery/
    http://www.w3schools.com/jquery/
    If you have a budget to work with, get PVII's Pop-Menu Magic2.
    http://www.projectseven.com/products/menusystems/pmm2/
    Hans-Günter

Maybe you are looking for

  • Sql Exception on Testing Configuration with SQL Server JDBC driver for XA

    I have a requirement of analyzing the behavior of SQL Server JDBC data sources for XA transactions in our application.We have been using Non-XA drivers for both Oracle and SQL Server as we had no requirement for transactions spanning across multiple

  • Why can't I get the itunes store to open?

    Why won't the itunes store open?  It appears briefly, then the screen goes white. I can still access my music, see my gift card balance, and play my music.  I just can't buy anything new, and it's making me CRAZY.  I've tried everything...please HELP

  • Navigating ADF Train to a specific stop on page load

    Hello friends, I am working on the GUI of an ADF web application, which requires the use of train component. It is possible to navigate the train component to a specific stop programmatically once the page containing the train component is loaded but

  • What programs are loaded onto the MacBook.

    I am looking at getting a MacBook sometime this upcoming weekend, and I was wondering what programs are loaded onto it?? And which ones are good for just basic usage (documents and internet)for now? I plan to get photoshop at a later date for photo e

  • WebDynpro Java application in xMII

    Hi All, Is it possible to integrate a web dynpro java application into an xMII dashboard? If yes please provide pointers to any suitable documentation. Thanks Lisha