Tagged: x
-
AuthorPosts
-
May 17, 2016 at 2:03 am #995030
sistemasArquisocialParticipantI used this HTML in a local HTML file and works. However, if you use the HTML page code in the body of the page with Cornerstone and put the script in the “Custom Javascript” editor does not work. I think the “Acceder” button with the value “button” in the “type” attribute does nothing and doesn’t execute the code onclick = “javascript: Login ();” What I have to do to make it work?
<html> <head> <script type="text/javascript"> function CTRL(id) { if (id) { return document.getElementById(id) } } function Login() { var cliente = "FEPAS"; var usuario = CTRL('usuario').value; var password = CTRL('contrasena').value; var retorno = "http://www.fepas.org/inicio/portal-del-empleado"; document.location.href = 'https://www.rrhhonline.com.es/VoodooFUNCTIONS.aspx?comando=NEWLOGIN&cliente=' + cliente + '&usuario=' + usuario + '&password=' + password + '&error=' + retorno; return false; } </script> </head> <body> <H1>EJEMPLO DE AUTENTICACION</H1> <form action="#" id="loginpanel" method="post"> <table> <tr><td> <label for="usuario">Usuario:</label></td><td><input id="usuario" name="usuario" type="text" value="" /> </td></tr><tr><td> <label for="contrasena">Contraseña:</label></td><td><input class="casilla" id="contrasena" name="contrasena" type="password" value="" /> </td></tr><tr><td></td><td> <input name="Acceder" type="button" onclick="javascript:Login();"value="Acceder" /> </td></tr><tr><td> </table> </form> </body> </html>If I make the form contact form 7, where should put each code? How should I write?
May 17, 2016 at 2:31 am #995056
NicoModeratorHi There,
Thanks for writing in.
Would you mind sharing us your admin credentials so we could check your setup closer.
Don’t forget to set it as private reply.
Thanks.
May 17, 2016 at 2:40 am #995064
sistemasArquisocialParticipantThis reply has been marked as private.May 17, 2016 at 4:22 am #995141
ChristianModeratorHey there,
Please don’t include the opening
<script type="text/javascript">and closing</script>tags. If it still doesn’t work, add your script in the head of the document. The Custom JS interface will output the script in the footer. There’s no interface in X that’ll add script to the head though. With that said, you must use a plugin like https://wordpress.org/plugins/oh-add-script-header-footer/ or use a custom function to add script to the head.If you’re not comfortable with the said methods, I recommend that you seek assistance from a WordPress developer.
Thanks.
May 17, 2016 at 5:33 am #995190
sistemasArquisocialParticipantHello again!
As my knowledge of PHP and JavaScript are very limited , I tried installing the plugin https://wordpress.org/plugins/oh-add-script-header-footer/ and it works. Thanks a lot!!May 17, 2016 at 5:59 am #995220
ThaiModeratorGlad you’ve sorted it out.
If you need anything else, please let us know 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-995030 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
