This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Button always end with page up

5 years ago · Last reply by Andrew Misplon 5 years ago

I am using the button from siteorigin widgets to execute some javascript code. And it works beautifully!
However after executing the code it shows the top of the page.
I have tried various versions of the code to set focus to an element on my page, but to no avail.

A button with no code also acts in the same way.

Any assistance would be much appreciated.

Andrew McGurk

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 5 years, 5 months ago

    Hi Andrew

    Thanks for reaching out.

    Is the Button widget part of the challenge? You could perhaps run a quick test. Create a new test page and add a button manually:

    <button onclick="myFunction()">Click me</button>

    Replacing the function above with your JS. Does the issue persist?

  2. Andrew McGurk 5 years, 5 months ago

    Thank you, that works fine.
    I guess I wasn’t using the SiteOrigin buttons correctly.
    Or something…!

    Thanks again for your prompt and correct response.

    Andrew McGurk

  3. Andrew Misplon Staff 5 years, 5 months ago

    Hi Andrew

    Thanks for running the test. If this works then you can use it as an alternative option. In Page Builder you could insert your code into the Custom HTML widget. It sounds like the Button widget might have been part of the issue, if you’d like me to take a look, please, send a link to a page showing the issue or a test page.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread