Geeks Talk

Prepare for your Next Interview




Textfield onchange function...

This is a discussion on Textfield onchange function... within the HTML & CSS forums, part of the Web Development category; In my html page, i am using the following code. input type="text" name="result" id="res" value="PASS" onchange="change_result();" The above function is working when the user change ...


Go Back   Geeks Talk > Web Development > HTML & CSS

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-30-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,007
Thanks: 0
Thanked 76 Times in 64 Posts
psuresh1982 will become famous soon enough
Textfield onchange function...

In my html page, i am using the following code.

input type="text" name="result" id="res" value="PASS" onchange="change_result();"

The above function is working when the user change the text on the textfield. But if i change the value of the textfield dynamically(using javascript function)it is not working.

Can anyone tell me why is not working? which function i am using here?

--------------------
suresh
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-02-2007
Junior Member
 
Join Date: Dec 2006
Location: chennai
Posts: 13
Thanks: 4
Thanked 3 Times in 3 Posts
daisy_deepa is on a distinguished road
Re: Textfield onchange function...

S...even i also face the same problem...
I just give one example , check it out whether it works......
Example:
function fun1()
{
if(document.f.na.value=="hello")
{
}
else
{
alert("Text Changed")
}
}
function fun2()
{
var mylist=document.getElementById("lang")
document.getElementById("na").value=mylist.options[mylist.selectedIndex].text
}

form name=f>
Language : select id=lang onchange=fun2(),fun1()>
option selected>Java
option>J2ME
option>C#
option>Dot Net
/select>

Favorite Language is :input type=Text name=na value="hello" onchange=fun1()>


/form>

Last edited by daisy_deepa : 06-02-2007 at 09:23 AM.
Reply With Quote
Reply

  Geeks Talk > Web Development > HTML & CSS


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
How does indexes function? Lokesh M SQL 10 10-07-2007 02:13 PM
pl/sql function gujjar Oracle Certification 3 02-22-2007 10:47 AM
yellow color textfield.... psuresh1982 HTML & CSS 2 02-03-2007 09:07 AM
TSL Function sutnarcha WinRunner 1 12-20-2006 05:40 AM
Function in PHP sripri PHP 1 07-20-2006 12:13 PM


All times are GMT -4. The time now is 12:52 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved