Category: Javascript

Sirve, por ejemplo, para cuando queremos probar nuestro código javascript en JQuery pero la página no tiene la librería cargada. Ejecutamos este código primero en la consola del navegador y […]
Crear notificación propia de SharePoint: var notifyId = ''; notifyId = SP.UI.Notify.addNotification("Hello World!", true); El primer parametro es HTML (podemos personalizarlo). El segundo parametro es para que desaparezca: “true” hará […]
In order to disable the ENTER key in your textbox type input, you have to add the ‘onkeydown’ attribute and call a javascript function that checks the key and avoid […]
You can add new div inside your web page by jquery always you want. You’ve to add the following code in your javascript function: $("#myExistentDiv").append("<div id='MyNewDiv'>This is my dynamic DIV</div>"); […]
You can remove any href that contains specific text inside the link. If you want to remove the link to any page that contains “DispForm” you can do it like […]
We want to hide “Level1” div that contains inside any “Level3” div in this code: <div class="level1"> Level 1A <div class="level2"> Level 2A <div class="level3"> Level 3A </div> </div> </div> […]
In order to avoid ENTER key in your asp:TextBox you’ve to add onkeydown event and control it, like this: <asp:TextBox ID="myTextBox" runat="server" onkeydown="return (event.keyCode != 13);"></asp:TextBox>
<script language="javascript" type="text/javascript"> document.location.href=document.location.protocol + '//' + document.location.host </script>
If you want to use the details view on a list or library and you don’t want to see the list of elements (maybe you need to show only one […]
Para pasar parámetros a través de la URL nos basta con añadir un “?” al final e ir insertando los parámetros que queramos con el patrón “nombre=valor” y separados por […]