Why do I get the ‘Unable to find script library ‘WebUIValidation.js” error ?

When you install the .Net framework on your web server, it installs some script files (including the above) under the root folder (usually ‘C:\inetpub\wwwroot’ if you do a default installation) . You can then find the above file at ‘C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322’, for example. The above problem could happen if you reconfigured your web root directory to be a different one after you installed ASP.Net in your web server. If that is the case, then run ’aspnet_regiis -c’ (utility is under %windir%\Microsoft.NET\Framework\v1.1.4322, for example) or copy over manually the above script files into a similar sub-directory below your current web root directory. Also, if you look at the error message in detail, you will notice where the file is supposed to be.

How can I resize the window?

You can resize a window with JavaScript using ‘window.resizeTo(valueX,valueY)’. <script> function ResizeWindow() { window.resizeTo(800,800); } </script> Note also that the parameters of resizeTo() have different meaning in different browsers. In Internet Explorer the parameters specify the outer size of the window, while in Netscape Navigator they refer to the inner size (which does not include the window borders, toolbar, status bar, title bar, and the address line). The ‘window.resizeBy()’ method is slightly different than it’s ‘resizeTo()’ which changes the windows dimensions by number of pixels from it’s current size.

How can you resize the html elements dynamically?

Html elements can be resized dynamically by using the style properties. In the below example the TextArea size is increased dynamically on clicking the button. <html> <script language=javascript> function resize() { document.form1.TextArea1.style.height=’600px’; document.form1.TextArea1.style.width=’400px’; } </script> <form name=form1> <TextArea style=’WIDTH: 200px; HEIGHT: 200px’ name=’TextArea1′></TextArea> <input type=’button’ style=’WIDTH: 100px; HEIGHT: 100px’ name=’button1′> </form> <input type=button value=’ClickMe’ onclick=javascript:resize()> </html>

How can you avoid postback on submit button?

The postback on submit button can be avoided by giving return=false in the event handler function as below. <INPUT type=’submit’ value=’Submit’ onclick=’return false;’>

How can you identify the drives available in the System?

The drives available in system can be identified using the following code. <HTML> <HEAD> <SCRIPT language=JavaScript> function ShowAvailableDrives() { document.write(GetDriveList()); } function GetDriveList() { var fso, s, n, e, x; fso = new ActiveXObject(‘Scripting.FileSystemObject’); e = new Enumerator(fso.Drives); s = ”; do { x = e.item(); s = s + x.DriveLetter; s += ‘:- ‘; if (x.DriveType == 3) n = x.ShareName; else if (x.IsReady) n = x.VolumeName; else n = ‘[Drive not ready]’; s += n + ‘ ‘; e.moveNext(); }while (!e.atEnd()); return(s); } </SCRIPT> </HEAD> <BODY> <P> <SCRIPT language=JavaScript> ShowAvailableDrives(); </P> </BODY> </HTML>