Posts Tagged ‘JavaScript’

Important JavaScript Form Objects & Events

जानेवारी 28, 2009

Here are the important JavaScript Form Objects and their events

Form Element Object HTML Tag Type Property Description Events
Button <input type=”button” button A push-button onClick()
Checkbox <input type=”checkbox” checkbox A toggle button without radio-button behaviour onClick()
FileUpload <input type=”file” file An input field for entering the name of a file to upload to the web server onChange
Hidden <input type=”hidden” hidden Data submitted with the form but not visible to the user -
Option <option> none A single item within a select object -
Password <input type=”password” password An input field for password entry- typed characters are not visible onChange
Radio <input type=”radio” radio A toggle-button with radio behaviour, only one selected at atime onClick()
Reset <input type=”reset” reset A push button that resets a form onClick()
Select <select> select-one A list or dropdown menu from which one item may be selected onChange()
Select (multiple) <select multiple> select-multiple A list or dropdown from which multiple items are selected onClick()
Submit <input type=”submit” submit A push button that submits the form onClick()
Text <input type=”text” text A single line text entry field onChange()
Textarea <textarea> textarea A multiple text entry field onChange()

Major JavaScript Objects and Functions

जानेवारी 24, 2009

Here are some of the Javascript objects and their properties & methods

Hierarchy Objects
Object Properties Methods Event Handlers
Window defaultStatus
frames
opener
parent
scroll
self
status
top
window
alert
blur
close
confirm
focus
open
prompt
clearTimeout
setTimeout
onLoad
onUnload
onBlur
onFocus
Frame defaultStatus
frames
opener
parent
scroll
self
status
top
window
alert
blur
close
confirm
focus
open
prompt
clearTimeout
setTimeout
none (The onLoad and onUnload event handlers belong to the Window object)
Location hash
host
hostname
href
pathname
por
protocol
search
reload
replace
none
History length
forward
go
back none
Navigator appCodeName
appName
appVersion
mimeTypes
plugins
userAgent
javaEnabled none
document alinkColor
anchors
applets
area
bgColor
cookie
fgColor
forms
images
lastModified
linkColor
links
location
referrer
title
vlinkColor
clear
close
open
write
writeln
none (the onLoad and onUnload event handlers belong to the Window object.
image border
complete
height
hspace
lowsrc
name
src
vspace
width
none none
form action
elements
encoding
FileUpload
method
name
target
submit
reset
onSubmit
onReset
text defaultValue
name
type
value
focus
blur
select
onBlur
onCharge
onFocus
onSelect
Built-in Objects
Array length join
reverse
sort xx
none
Date none getDate
getDay
getHours
getMinutes
getMonth
getSeconds
getTime
getTimeZoneoffset
getYear
parse
prototype
setDate
setHours
setMinutes
setMonth
setSeconds
setTime
setYear
toGMTString
toLocaleString
UTC
none
String length
prototype
anchor
big
blink
bold
charAt
fixed
fontColor
fontSize
indexOf
italics
lastIndexOf
link
small
split
strike
sub
substring
sup
toLowerCase
toUpperCase
Window
JavaScript Rocks!!

you can use javascript on asp.net form just by adding

<script language=”JavaScript”>
</script>

tag in the <head> of the asp.net page,

Between <script language=”JavaScript”> </script> tag you can declare your javascript function and then call it.