• I need to add javascript to a button created with WPi Designer Button Shortcode. Where do I add the script in order to make it run. I put it in the Advanced Link section, but it doesn’t seem to run, just refreshes the current screen. I have seen posts on the forum for the same request (a quick exit button) but can’t find any explanation of how to get it to work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WooPrali

    (@wooprali)

    Hi ,thanks for using designer button plugin.

    I will check and fix asap.

    Regards,

    Prali

    Plugin Author WooPrali

    (@wooprali)

    I’m having the same issue. Tried to put Javascript in the Advanced Link Section, but it just refreshes the page when clicked. I noticed in Firebug it’s throwing an error saying “invalid character”.

    I think what it’s doing is changing the quotes to curly tick marks. Should be ‘ but changes to ’ when you save it. Same thing happens to double quote marks. I put in ” but it changes to ” when you save it. Any way to fix that?

    Plugin Author WooPrali

    (@wooprali)

    Hi,

    If possible please give me the website link. So i can check the issue.

    Regards,

    PRALI

    Hello,
    I am trying to create a scape button too that redirects to weather.com and cleans the browser. But the code I am adding in the advance link section is not working. This is the code:

    window.open(“https://weather.com”, “_newtab”); window.location.replace(‘https://google.com’);

    Could you please advice?
    thanks

    Thread Starter slmwilkinson

    (@slmwilkinson)

    Sadly, I was not able to make this work. I finally linked to an external html page that performed the redirect. I never got the browser clearing to work.

    Plugin Author WooPrali

    (@wooprali)

    Hi,

    Thanks for using designer button plugin.

    You need to add javascript: before your code.

    Ex: javascript:pageTracker._trackPageview (‘example’)

    Ex: javascript:window.open(“https://weather.com”, “_newtab”);window.location.replace(‘https://google.com’);

    If any issues please let me know.

    Regards,

    PRALI

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Javascript in Wpi Designer Button’ is closed to new replies.