Click here to Skip to main content
15,886,873 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: How to Create Website like PriceRaja.com Pin
Member 123665703-Mar-16 2:18
Member 123665703-Mar-16 2:18 
QuestionAlternative to SOAPUI Pin
lmnorms23-Feb-16 21:16
lmnorms23-Feb-16 21:16 
AnswerRe: Alternative to SOAPUI Pin
Nathan Minier25-Feb-16 1:57
professionalNathan Minier25-Feb-16 1:57 
Questionresponsive image element inside fieldset element using bootstrap.css and img-thumbnail Pin
jkirkerx18-Feb-16 14:05
professionaljkirkerx18-Feb-16 14:05 
QuestionUsing a spinner on a input file element Pin
jkirkerx17-Feb-16 13:26
professionaljkirkerx17-Feb-16 13:26 
AnswerRe: Using a spinner on a input file element Pin
Richard Deeming18-Feb-16 2:59
mveRichard Deeming18-Feb-16 2:59 
GeneralRe: Using a spinner on a input file element Pin
jkirkerx18-Feb-16 4:04
professionaljkirkerx18-Feb-16 4:04 
GeneralRe: Using a spinner on a input file element Pin
jkirkerx18-Feb-16 4:16
professionaljkirkerx18-Feb-16 4:16 
I got my cog to spin, Happy now.
I just made a cog and toggled the class of the cog.
<div class="form-group">
  <label class="control-label">Enter your avatar's name max(40)</label>
  <div class="input-group">
    <span class="input-group-addon">
      <i class="fa fa-folder-open"></i>                                                                                                
    </span>
    <input id="AvatarName" class="form-control" type="text" maxlength="40">
    <span class="input-group-btn">
      <span class="btn btn-primary btn-file">
        Choose                                                             
        <input id="AvatarBrowse" name="AvatarBrowse" class="btn btn-primary spinner" type="file" />
        <i id="AvatarSpinner" class=""></i>                                                                                                                                                                                                                                                
      </span>                                                        
    </span>
  </div>
</div>

And then the JQuery Side
function run_upload_serviceAvatar(e) {

    var _files = e.target.files,
        $spinner = $("#AvatarSpinner");

    if (_files.length > 0) {

        $spinner.toggleClass("fa fa-cog fa-spin");

        if (window.FormData !== undefined) {
            var _data = new FormData();
            for (var x = 0; x < _files.length; x++) {
                _data.append("file" + x, _files[x]);
            }            

            $.ajax({
                type: "POST",
                url: '/Admin/json_upload_avatar?id=-1',
                contentType: false,
                processData: false,
                data: _data,
                error: function (xhr, status, p3, p4) {

                    var err = "run_upload_serviceAvatar Error: " + " " + status + " " + p3 + " " + p4;
                    if (xhr.responseText && xhr.responseText[0] == "{") {
                        err = JSON.parse(xhr.responseText).Message;
                    }
                    console.log(err);
                    $spinner.toggleClass("fa fa-cog fa-spin");

                },
                success: function (data) {
                    console.log(data);
                    $spinner.toggleClass("fa fa-cog fa-spin");

                }
            });
        }
        else {

            alert("This browser doesn't support HTML5 file uploads!");
        }
    }    
}


modified 18-Feb-16 11:11am.

AnswerRe: Using a spinner on a input file element Pin
Brisingr Aerowing26-Feb-16 17:57
professionalBrisingr Aerowing26-Feb-16 17:57 
GeneralRe: Using a spinner on a input file element Pin
jkirkerx27-Feb-16 13:08
professionaljkirkerx27-Feb-16 13:08 
GeneralRe: Using a spinner on a input file element Pin
Brisingr Aerowing27-Feb-16 15:13
professionalBrisingr Aerowing27-Feb-16 15:13 
GeneralRe: Using a spinner on a input file element Pin
jkirkerx28-Feb-16 8:09
professionaljkirkerx28-Feb-16 8:09 
QuestionThwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 7:10
C-P-User-316-Feb-16 7:10 
AnswerRe: Thwarting CTRL-A Copies PinPopular
Richard Deeming16-Feb-16 7:53
mveRichard Deeming16-Feb-16 7:53 
GeneralRe: Thwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 7:57
C-P-User-316-Feb-16 7:57 
GeneralRe: Thwarting CTRL-A Copies Pin
Richard Deeming16-Feb-16 8:02
mveRichard Deeming16-Feb-16 8:02 
GeneralRe: Thwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 8:03
C-P-User-316-Feb-16 8:03 
GeneralRe: Thwarting CTRL-A Copies Pin
Richard Deeming16-Feb-16 8:05
mveRichard Deeming16-Feb-16 8:05 
GeneralRe: Thwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 8:09
C-P-User-316-Feb-16 8:09 
GeneralRe: Thwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 8:13
C-P-User-316-Feb-16 8:13 
GeneralRe: Thwarting CTRL-A Copies Pin
C-P-User-316-Feb-16 9:56
C-P-User-316-Feb-16 9:56 
QuestionTo Everyone Pin
mharie14-Feb-16 2:17
mharie14-Feb-16 2:17 
AnswerRe: To Everyone Pin
Richard MacCutchan14-Feb-16 2:38
mveRichard MacCutchan14-Feb-16 2:38 
QuestionHow to call webservice using WSDl file ? Pin
HarshadDarji1913-Feb-16 23:58
HarshadDarji1913-Feb-16 23:58 
QuestionClassic asp Soap response with xml and attachment Pin
uglyeyes11-Feb-16 0:50
uglyeyes11-Feb-16 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.