Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #995030
    sistemasArquisocial
    Participant

    I 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&ntilde;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?

    #995056
    Nico
    Moderator

    Hi 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.

    #995064
    sistemasArquisocial
    Participant
    This reply has been marked as private.
    #995141
    Christian
    Moderator

    Hey 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.

    #995190
    sistemasArquisocial
    Participant

    Hello 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!!

    #995220
    Thai
    Moderator

    Glad you’ve sorted it out.

    If you need anything else, please let us know 🙂

  • <script> jQuery(function($){ $("#no-reply-995030 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>