|
Hi Michael,
Ya its working fine for me. Thanks a lot for your kind help. But again there is one small problem. When i type 'pe' it goes to 'Peter'. After that when i do it for the second time, its not working.(i.e After i typed 'pe', I wait for 1000 ms for the dropdownlist to select 'peter'. That's fine. Then I typed 'Ki', the dropdownlist has not select the name 'Kiran'. It selects "Indhu"). Have you checked that. If you know the answer let me know.
Else again thanks a lot for your kind help.
Thanks and Regards,
Hariharan C
|
|
|
|
|
I have tried that. It works.
Hari_1010 wrote: (i.e After i typed 'pe', I wait for 1000 ms for the dropdownlist to select 'peter'. That's fine. Then I typed 'Ki', the dropdownlist has not select the name 'Kiran'. It selects "Indhu").
Did you wait for 1000 ms after typing 'Ki'?
I have tested with the following data..
DropDownList1.Attributes.Add("onkeypress", "foo(event,'" + DropDownList1.ClientID + "');");<br />
<br />
List<string> list = new List<string>();<br />
list.Add("Alien");<br />
list.Add("Emos");<br />
list.Add("Emos2");<br />
list.Add("Poker");<br />
list.Add("Peter");<br />
list.Add("Michael Sync");<br />
list.Add("Petro");<br />
list.Add("Pet");<br />
list.Add("Elizabeth");<br />
list.Add("Kiran");<br />
list.Add("Kate BackInSales");<br />
<br />
DropDownList1.DataSource = list;<br />
DropDownList1.DataBind()
I tried three times. ('Pe', 'Ki', 'Em'). It works fine.. Please try it again and let me know..
Note: you have to wait 1000 ms every time after typing something...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
I checked it again. For me its working fine for the first time only. Anyway Michael thanks a lot for your help.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hi Hariharan,
I think that you didn't check the code that I give you second time. I have uncommented the pressedString = ""; in move function..
You may also check this ASP.NET: DropDown List problem with IE6[^]
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
Very good morning. I just saw your reply after the weekend.
You are correct. Yes i forget to uncomment the code. Now its working fine. Thanks a lot man. This is going to be very useful for me.
Thanks and Regards,
Hariharan
|
|
|
|
|
Hi Michael,
Now I have added one more dropdownlist and bound to the object data source(says Employee name). Then I tried to call your script, where its not working. Can you please tell me what I have to do now.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hi Hariharan,
It's good to hear that. If my script works for you, don't forget to vote my message. thanks.
Instead of using static name "DropDownList1", you should probably pass this name as the parameter. so, it will work if you have more than one dropdown.
var selectList = document.getElementById('DropDownList1');
This variable holds only one value. maybe. you can add more variables. or you can handle this variable to hold the value depend on what the user is typing.
var pressedKeyString = "";
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
In the function "foo(event,id)", can you tell me what is the use of the event.
See in my website I got this dropdown list in a formview insert template where it bound to the object data source. I have added your script to my master page. And the function calling is as follows,
protected void FormView1_DataBound(object sender, EventArgs e)
{
switch (FormView1.CurrentMode)
{
case FormViewMode.Insert:
((DropDownList)FormView1.FindControl("DropDownList3")).Attributes.Add ("onkeypress", "javascript:return foo(event,'ctl00_ContentPlaceHolder1_FormView1_DropDownList3');");
break;
}
}
But its not working in my page. So can you please help me on this. Dont worry Michael defenitely i am going to vote for you. Thanks in advance.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hi
I am facing a problem in CSS for Header Background url.
I applied a Background-image for a Header(h1) in my page.It's working fine in IE, but it is not working in Mozilla.
What all the modification I have to do to get it done in Mozilla also.
My CSS for h1 is some thing like this.....
#subMenu ul li h1
{
position:relative;
color: White;
font-size:13px;
padding:7px 0 8px 5px;
background-image:url(menu bar2.JPG);
text-transform: uppercase;
margin-right:1px;
}
Please suggest me an example.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Hi all
I am trying to display DB records in Flash
My code :
----------------
In .aspx page
Page AutoEventWireup=false AspCompat=true Language = VB
<
dim DataConn = Server.CreateObject("ADODB.Connection")
'DataConn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" Server.MapPath("resumes.mdb")
DataConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("resumes.mdb"))
dim cmdTemp = Server.CreateObject("ADODB.Command")
dim rstContacts = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "Select * From rms"
cmdTemp.CommandType = 1
cmdTemp.ActiveConnection = DataConn
rstContacts.Open (cmdTemp, , 1, 3)
rstContacts.Move (CLng(Request("Record")))
Response.Write(rstContacts("ids").Value & " " & rstContacts("uname").Value & " ")
rstContacts.Close
DataConn.Close
>
------------------
is it a right way ?
Can any one help me on displaying DB records on flash
By using .NET i am using .NET 1.1 Ver
Thank Q
|
|
|
|
|
What does flash have to do with any of this ?
Why are you not using a code behind file ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi thnx For reply
I didnt get u
my task is to display the DB record in flash
i tryed with that code (.aspx)
my flash code is :
------------------------
onClipEvent(load)
{
CurrentRecord = 0;
loadVariables ("http://localhost/20-3-2006/FlashDB/WebForm3.aspx?Record=0", this);
}
onClipEvent(data)
{
strids = ids;
struname = uname;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
}
----------------------------------
But it is giving Error :
Error opening URL "http://localhost/20-3-2006/FlashDB/WebForm3.aspx?Record=7"
Plz tell me if u know any other way to display
ThanQ
|
|
|
|
|
I have no idea, I don't do flash. I just saw a bunch of ASPX code and a flash question. The web dev forum is perhaps a better place for a flash question.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think session_end is fired when a user's session times out.then i implemented it .the session time is 20 seconds.if the session times out , the control should automatically move to session_end function in global.asax file ? curently it is not moving to session_end function , as the session times out.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi sonia, well this is some un realistic type of problem u have posted as this could not be possible that Session_end event wouldnt get fires on session expiration.
As this event automatically fires so no possibility that we missed with this event to fire.
ok do one think try to redirect to some other page when session expires or try to message some thing on page.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Sonia Gupta wrote: I think session_end is fired when a user's session times out.
And when you call Session.Abandon() .
Sonia Gupta wrote: the control should automatically move to session_end function in global.asax file ? curently it is not moving to session_end function , as the session times out.
What control you are expecting to move ? When session timeout, ASP.NET engine will fire session_end event. I don't know what you meant by control.
|
|
|
|
|
can u come online at
soniagupta1@yahoo.co.in
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sorry I don't have access.
|
|
|
|
|
ok
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi i have like this one table...,
id value1 edate
100 2000 5/21/2006
100 3000 7/14/2006
100 1600 12/12/2006
100 4000 5/17/2007
in this suppose i want to see the value in the month of 11 and year 2006
i will select like this:
select top 1 from tablename where empid=100 and (datepart(yyyy,edate) < 2006 or (datepart(yyyy,edate) = 2006 and datepart(mm,edate) <= 11)) order by edate desc
so it will give the value:
100 3000 7/14/2006
same like this suppose i want to update the month value...
how to do that...,
Plz help me..,
Regards,
Magi
|
|
|
|
|
How is top 1 a wise way to get the record you want ? The best bet I would say, is to get the Id into a variable, then use that to do the update, probably in a stored proc.
Oh, I take it back - top 1 is just a waste of time, you specify the id. So, this is SQL 101, a standard update statement that specifies the Id of the record to update. Judging from the SQL you're using here, you really need to buy a book on SQL. Your current statement should be
select id, value1, edate from tablename where empid = 100
No other SQL is needed. It's certainly stupid to use top 1 and order by in the same line, how does the order matter when you asked for one record ?
update tablename set value1=2500, edate=getdate() where empid = 100, would update the record with a value of 2500 and the current date. Promise now that I told you this, you'll take the time to learn some SQL before working on databases anymore ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
update tblname set bassalary=10001
from (Select top 1 * from tblname where empid=100
and (datepart(yyyy,edate) < 2006 or (datepart(yyyy,edate) = 2006
and datepart(mm,edate) <= 11)) order by edate desc) as th
where tblname.edate=th.edate
It will work...,
Magesh
|
|
|
|
|
Hi All!
I am reading a data from the database the string read is then passed to javascript function. This data(string) may contain a return white space i want to replace this return character with a <br> tag. Is there any Method to do this
Regards
|
|
|
|
|
return and whitespace are two different things.
The Replace function on the string class will let you change instances of Environment.NewLine, or whatever, to break tags, or anything else you'd like
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks a lot for the reply. It Worked!!
Regards
|
|
|
|