Home>Support>Button always end with page up

Button always end with page up

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. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 13 days, 7 hours ago Andrew Misplon Hi, I Work Here

    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. 12 days, 10 hours ago Andrew McGurk

    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. 12 days, 8 hours ago Andrew Misplon Hi, I Work Here

    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.

Please log in to post on our forums. Signing up is free.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More