Onclick problem

Hello and i hope that everyone is having a good day,

i have two buttons on my site which are used to do two things: hide the content to show the background and display an overlay/modal menu.

The scripts work perfectly in ie11, Edge, Chrome, Opera, Firefox 59 on my public pages. However, after i login to my app, the scripts only work in Edge and ie11. Why?

i have tried everything and only onclick with a simple function will work. I don’t understand why the exact script works on the public side. I’ve made no changes other than css id names.

Firefox reports that my function is not defined but it does not do this on the public pages.

onclick="return openOverlay();"

function openOverlay() {
  (function() {
     //my code
  });
}

anyone know why? or maybe someone can help me with a secure onclick event script?

You know, i quit with JavaScript. I’m just going to scrap this idea and transition to a form. This happened to me the last time with the overlay. Everytime i have a problem it is JavaScript related. I’m pissed.

i figure i will just place the showbg photo into a form prg that hides the content, which is better because it works like a lock screen instead of this js crap.

the overlay i will miss. i’ve tried to battle this but i’m moving on. i’ll just have to replace it with a php page for each option.

logging out to change my code.
Thank you for reading and sorry for wasting a post.

I would guess that the Javascript placement is the issue.

I don’t know and i am dropping js now. i have no time for this minor unnecessary code. i can live without it and i want a lock screen anyway. now i can just add a lock screen button on the show bg display.

you may want to look at my next post in freelance…

Sponsor our Newsletter | Privacy Policy | Terms of Service