There are many a times where we want to remove few standard buttons from page layout, but there is no such option to remove such restricted buttons. Few such buttons are … “New Note” or “Attach File” button on Google Docs, Notes, & Attachments Related list “Save & Send Invitation” button on New Event page [...]
Problem Statement I use the YUI dialog in my project and turn on the “modal”, the initializing code looks like: document.mainDialog = new YAHOO.widget.Dialog("mainPanel", { modal: false, width: "89em", height: "30em", fixedcenter: true, visible: false, constraintoviewport: true }); The modal works fine in IE 7.0 and Fireforx 3.0, it generates a transparent mask to prevent [...]
Ran into an (other) interesting Internet Explorer bug. Seems that if you have a form with only a single text input, hitting the enter button will not submit the form in IE. <form action="" method="post"> <fieldset> <label for="user_name">User Name</label> <input type="text" name="user_name" id="user_name" /> </fieldset> <fieldset class="button"> <button type="submit" name="submit" id="submit" title="Verify User Name">Verify User [...]
Following code helps you to define any JS function to be called on page load. The tricky part of the code is that it waits until page is completely loaded. <script> function init() { alert(‘Loaded’); } var previousOnload = window.onload; window.onload = function() { if (previousOnload) { alert(‘…loading …’); previousOnload(); } init(); }</script> Share and [...]
Ack:- Lunar Media Have you ever needed to HtmlEncode a querystring using JavaScript? Yes you may say, and several people will claim that you should UrlEncode it using escape(str); For some unknown reason I tried doing exactly that and UrlDecode the variable in csharp with no luck. Instead I found a solution in the Prototype [...]
Type the following code in Address bar to fill the form fields named Ad1 and Ad2 wth certain text. javascript:function A(){document.getElementById(‘Ad1′).value =”sadAS1″;document.getElementById(‘Ad2′).value = “sadAS2″;}setTimeout(‘A()’); void(0) Share and Enjoy: