Showing posts with label JS. Show all posts
Showing posts with label JS. Show all posts

Thursday, November 26, 2009

how to get dropdownlist selected value and text in javascript

var IndexValue = $get('<%=ddlGraphperiod.ClientID %>').selectedIndex;
var SelectedText = $get('<%=ddlGraphperiod.ClientID %>').options[IndexValue].text;
var SelectedVal = $get('<%=ddlGraphperiod.ClientID %>').options[IndexValue].value;

How to call Server Side function using ajax in asp.net

Using Web method we can call server side method from java script.

Use following link for more details.

"http://69.10.233.10/KB/ajax/ajax_server_side_call.aspx?display=Print"

Navigation in Page using JS

Use "history.go(-1);return false;" to go back in browser based application.
"history.go(1);return false;" to go forward in browser based application.