locked
HTML Client: Prevent spinning circle (ui-loader class) on form submission RRS feed

  • Question

  • I have a lightswitch HTML application I'm working on that queries Ebay for products.

    I have a local string property on a page that I have wrapped in form tag, submitting to a javascript function. The form doesn't "post" to anywhere. I'm really only using a form tag for the submission, since I do not want to have a submit button. I tried capturing the Enter keyup event, but it didn't work on mobile platforms. 

    Any time the form is submitted, Lightswitch places an element with a spinning circle over the screen. I've tried removing it with jQuery via $('.ui-loader').remove() and .hide(), which works in the javascript console, but it doesn't work from within the application. How can I prevent this spinning circle from displaying when I submit a form?

    myapp.AddHardware.eBaySearch_postRender = function (element, contentItem) {
        // Write code here.
        var text = "";
        var input = $(element).children('input');
        input.change(function () {
            text = encodeURIComponent(input.val());
            input.wrap('<form></form>');
            input.submit(FindProducts(text));
        })
    };



    Saturday, October 18, 2014 5:48 PM

Answers

  • Found it myself! 

    input.wrap('<form action="javascript:void(0);"></form>');

    Saturday, October 18, 2014 5:56 PM

All replies

  • Found it myself! 

    input.wrap('<form action="javascript:void(0);"></form>');

    Saturday, October 18, 2014 5:56 PM
  • Found it myself! 

    input.wrap('<form action="javascript:void(0);"></form>');

    Glad that you've solved your problem by yourself. Thank you for sharing your solutions to us, and welcome to post your question on LightSwitch forum in the future.

    Best regards,

    Angie



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 20, 2014 8:55 AM