Tag: Javascript
webform_dopostbackwithoptions is undefined
A few days back I’ve got the error message “webform_dopostbackwithoptions is undefined” on the project that i’m working on.
The strange thing it happened only when I activated the securepagemodule, when i deactivated the module it works perfectly. I tried to debug it with HTTP debugger (fiddler tool) and i found that on that particular [...]
Posted: September 1st, 2008 under .NET, ASP.NET.
Tags: .NET, Javascript
Comments: none
key event handler that compatible with all browsers using javascript
This might be useful for web developer which wants to have one key event handler that compatible with all browsers.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script language=JavaScript>
document.onkeyup = KeyCheck;
function KeyCheck(e)
{
//this is used for cross browser
var KeyID = (window.event) ? event.keyCode : e.keyCode;
switch(KeyID)
{
case 13:
[...]
Posted: September 1st, 2008 under Javascript.
Tags: Javascript
Comments: none
Set Default value with clear text for input type=”password”
Normally we have two text boxes which is user name and password. On the first load of the page we want to set the default value of user name text box becoming ‘username’ and set the default value of password text box becoming ‘password’ not ‘*******’.
Well what most of us think that we can [...]
Posted: August 29th, 2008 under ASP.NET, Javascript, VB.NET.
Tags: ASP.NET, HTML, Javascript
Comments: none
SYS is undefined in AJAX Update Panel
I tried to implement AJAX on my website by using AJAX extension on visual studio .NET. I tried to drag update panel to my page and I’ve put my button event handler to the trigger collection in update panel. I was expecting when i click that particular button then it will not refresh or load [...]
Posted: August 29th, 2008 under ASP.NET.
Tags: AJAX, ASP.NET, Javascript
Comments: none
Querystring in Javascript
This is a function to capture querystring in javascript. I used this javascript to control my menu dynamically.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script type="text/javascript">
function getQueryString(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
var aParam = [...]
Posted: August 29th, 2008 under Javascript.
Tags: Javascript, querystring
Comments: none
Register Javascript to hide Div
Sometimes people add javascript into the aspx page instead of using code behind but there is a case when we need to add javascript in the runtime using code behind. This is the example where javascript is used to provide switching of visibility based on the table visibility status. I used this technique to hide [...]
Posted: August 29th, 2008 under C#, Javascript.
Tags: Javascript, startup script
Comments: none