Click here to Skip to main content
15,891,951 members
Home / Discussions / Web Development
   

Web Development

 
GeneralGetting event hanlder name Pin
Brady Kelly18-Jun-07 4:43
Brady Kelly18-Jun-07 4:43 
GeneralRe: Getting event hanlder name Pin
Johnny ²18-Jun-07 14:30
Johnny ²18-Jun-07 14:30 
GeneralRe: Getting event hanlder name Pin
Brady Kelly18-Jun-07 20:59
Brady Kelly18-Jun-07 20:59 
QuestionJavascript String Prob Pin
tadhg8818-Jun-07 1:03
tadhg8818-Jun-07 1:03 
AnswerRe: Javascript String Prob Pin
Sreekumar P P18-Jun-07 1:32
Sreekumar P P18-Jun-07 1:32 
AnswerRe: Javascript String Prob Pin
Christian Graus18-Jun-07 1:36
protectorChristian Graus18-Jun-07 1:36 
QuestionDrop down list Pin
Tauseef A18-Jun-07 1:02
Tauseef A18-Jun-07 1:02 
AnswerRe: Drop down list Pin
Sreekumar P P18-Jun-07 1:54
Sreekumar P P18-Jun-07 1:54 
i would recomend to add a default text to the dropdown after binding.
dropdownXYZ.DataSource = something;
dropdownXYZ.DataValueField = something;
dropdownXYZ.DataTextField = something;
dropdownXYZ.DataBind();
dropdownXYZ.Items.Add("Select One");
dropdownXYZ.SelectedIndex = ddlEventIDONX.Items.Count-1;
// Assuming that you won't be having any negetive value in real time.
dropdownXYZ.SelectedItem.Value = "-1";

---
On Clear Button Click event, change the drowndown to "-1"

However, i would recommend this clear button to have javascript function. Why should it make an unnecessary round trip to server and waste time even if that is just seconds.

--Javascript ---
loop thru the document and find all required controls like text box, dropdowns etc and clear it....
----
var controls = document.all;
if(controls[i].tagName == 'INPUT' || controls[i].tagName == 'SELECT' || controls[i].tagName == 'TEXTAREA' || ... etc)
if(controls[i].value.length > 0 )
{
//Clearing Text Box
if(controls[i].tagName == 'INPUT')
controls[i].value = "";

//For DropDows
else if(controls[i].tagName == 'SELECT' )
{
if(controls[i].value != -1)
controls[i].value = -1;
}
else if(controls[i].tagName == 'TEXTAREA') controls[i].value = "";

----- etc..
}


Sreekumar PP
AnswerRe: Drop down list Pin
Tauseef A18-Jun-07 18:08
Tauseef A18-Jun-07 18:08 
QuestionSharepoint API Pin
progman17-Jun-07 22:07
progman17-Jun-07 22:07 
QuestionWorking with Windowns Media Player in Website ??? Pin
HarryIsp200717-Jun-07 20:42
HarryIsp200717-Jun-07 20:42 
AnswerRe: Working with Windowns Media Player in Website ??? Pin
Guffa17-Jun-07 21:05
Guffa17-Jun-07 21:05 
GeneralRe: Working with Windowns Media Player in Website ??? Pin
HarryIsp200717-Jun-07 21:21
HarryIsp200717-Jun-07 21:21 
AnswerRe: Working with Windowns Media Player in Website ??? Pin
Johnny ²17-Jun-07 21:23
Johnny ²17-Jun-07 21:23 
GeneralRe: Working with Windowns Media Player in Website ??? Pin
HarryIsp200717-Jun-07 21:32
HarryIsp200717-Jun-07 21:32 
GeneralRe: Working with Windowns Media Player in Website ??? Pin
badgrs18-Jun-07 0:25
badgrs18-Jun-07 0:25 
GeneralRe: Working with Windowns Media Player in Website ??? Pin
HarryIsp200719-Jun-07 15:22
HarryIsp200719-Jun-07 15:22 
QuestionI don't update DB with javascript Pin
tranglt17-Jun-07 16:31
tranglt17-Jun-07 16:31 
AnswerRe: I don't update DB with javascript Pin
Guffa17-Jun-07 19:12
Guffa17-Jun-07 19:12 
GeneralRe: I don't update DB with javascript Pin
tranglt17-Jun-07 23:54
tranglt17-Jun-07 23:54 
GeneralRe: I don't update DB with javascript Pin
tranglt18-Jun-07 0:33
tranglt18-Jun-07 0:33 
AnswerRe: I don't update DB with javascript Pin
Guffa19-Jun-07 10:52
Guffa19-Jun-07 10:52 
QuestionRe: I don't update DB with javascript Pin
tranglt19-Jun-07 15:54
tranglt19-Jun-07 15:54 
GeneralRe: I don't update DB with javascript Pin
Vasudevan Deepak Kumar19-Jun-07 21:25
Vasudevan Deepak Kumar19-Jun-07 21:25 
QuestionRe: I don't update DB with javascript Pin
tranglt18-Jun-07 0:34
tranglt18-Jun-07 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.