Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to hide/unhide label in IE
Message
 
À
08/12/2015 12:31:36
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628643
Message ID:
01628713
Vues:
49
Hi Peter,
Here one example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
        
        <title>Untitled 1</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
        
        <script type="text/javascript">
        /* code from qodo.co.uk */
        // create as many regular expressions here as you need:
        var digitsOnly = /[1234567890]/g;
        var integerOnly = /[0-9\.]/g;
        var alphaOnly = /[A-Za-z]/g;

        function restrictCharacters(myfield, e, restrictionType) {
            if (!e) var e = window.event
            if (e.keyCode) code = e.keyCode;
            else if (e.which) code = e.which;
            var character = String.fromCharCode(code);

            // if they pressed esc... remove focus from field...
            if (code==27) { this.blur(); return false; }
            
            // ignore if they are press other keys
            // strange because code: 39 is the down key AND ' key...
            // and DEL also equals .
            if (!e.ctrlKey && code!=9 && code!=8 && code!=36 && code!=37 && code!=38 && (code!=39 || (code==39 && character=="'")) && code!=40) {
                if (character.match(restrictionType)) {
                    return true;
                } else {
                    return false;
                }
                
            }
        }

        function toggleDisplay(id, displayvalue)
        {    
            if ( displayvalue == "others" ) {
                 document.getElementById(id).style.display = 'block';
            } else {
                 document.getElementById(id).style.display = 'none';
            }
        }
        
        function clickme(){
            var test  = $.post( "VFPS://EVENT/", function() { SetText("Success");})
                         .fail(function() { SetText("Error"); })
            return false;
        }
        
        function SetText(cText){
            $("#dept-inputbox").val(cText);
            $("#dept_input_div").show();
        }
        </script>
    </head>

    <body>
        <form method="get">
            <div id="dept_input_div" style="display: none">
                  <input class="inputbox" name="dept-input" type="text" id="dept-inputbox" />
            </div>
            <table style="width: 100%; height: 181px;">
                <tr>
                    <td style="width: 140px" class="style1">Bank:</td>
                    <td>
                        <input name="Text1" id="txtBank" type="text" />
                    </td>
                </tr>
                <tr>
                    <td style="width: 140px" class="style1">Account Number:</td>
                    <td>
                            <input type="text" id="txtAccount" onkeypress="return restrictCharacters(this, event, integerOnly);" />
                    </td>
                    </tr>
                <tr>
                    <td style="width: 140px">Name:</td>
                    <td>
                        <input name="Text2" id="txtName" type="text" />            
                    </td>
                </tr>
                <tr>
                    <td style="width: 140px">Description:<br />
                    </td>
                    <td>
                        <textarea cols="20" name="TextArea1" id="txtDesciption" rows="2"></textarea>            
                    </td>
                </tr>
            </table>
             <button id="sbmt_button" onclick="return clickme();">ok</button> 
        </form>
    </body>
</html>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform