| | |
drop down list selected index change doesn't work in mozilla
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
Hi
i want to bind a drop down list on the other drop down list selected index change event. i m using the following code---
ddlid.Attributes.Add("onchange","javascript:callfunction(this);")
function is written in a seperate js file.
this works in IE but not in Mozilla... plz give me the solution so that it will work in Mozilla also
Thanks
i want to bind a drop down list on the other drop down list selected index change event. i m using the following code---
ddlid.Attributes.Add("onchange","javascript:callfunction(this);")
function is written in a seperate js file.
this works in IE but not in Mozilla... plz give me the solution so that it will work in Mozilla also
Thanks
if i put that function ( which is written in a seperate js file) in the same file then it works...
i have included the js file also, but if this function is written in the js then it is not working,
please solve my this problem also
and thanks 4 solving my background-color code problem...
bbye
i have included the js file also, but if this function is written in the js then it is not working,
please solve my this problem also
and thanks 4 solving my background-color code problem...
bbye
Thanks & Regards
Umang
Umang
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
This is because you are compiling your page before the javascript runs. Try adding the javascript to your page before you call your code. Example is below:
ASP.NET Syntax (Toggle Plain Text)
If Not Page.IsPostBack Then If Not Page.IsClientScriptBlockRegistered("IncludedJavascript") Then Page.RegisterClientScriptBlock("IncludedJavascript", "<SCRIPT Language=""JavaScript"" src=""javascriptincludedfile.js""></SCRIPT>") End If ddlid.Attributes.Add("onchange","javascript:callfunction(this);") End If
Last edited by SheSaidImaPregy; Nov 8th, 2007 at 1:03 pm.
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
if you wish to know more about this stuff, microsoft has a good article on it.
http://msdn2.microsoft.com/en-us/library/aa478975.aspx
http://msdn2.microsoft.com/en-us/library/aa478975.aspx
Hi, i m using the following code but it is not working...
if(!Page.IsPostBack)
{
if(!Page.IsClientScriptBlockRegistered("scriptcode"))
{
Page.RegisterClientScriptBlock("scriptcode","<script language=javascript src=\"scriptcode.js\"></script>");
}
}
actually that drop down is pasted on a user control and the user control is pasted on a page. i have written this code on the both page user control and the actual page, but it is not working....
what should i do???
if(!Page.IsPostBack)
{
if(!Page.IsClientScriptBlockRegistered("scriptcode"))
{
Page.RegisterClientScriptBlock("scriptcode","<script language=javascript src=\"scriptcode.js\"></script>");
}
}
actually that drop down is pasted on a user control and the user control is pasted on a page. i have written this code on the both page user control and the actual page, but it is not working....
what should i do???
Thanks & Regards
Umang
Umang
if i write on the page
Page.RegisterClientScriptBlock("scriptcode","<script language=javascript src=\"scriptcode.js\"></script>");
Response.Write("<script>alert('hit');</script>");
it shows the message hit.
but if i write the same code on the user control it doesn't show the message.
Page.RegisterClientScriptBlock("scriptcode","<script language=javascript src=\"scriptcode.js\"></script>");
Response.Write("<script>alert('hit');</script>");
it shows the message hit.
but if i write the same code on the user control it doesn't show the message.
Thanks & Regards
Umang
Umang
![]() |
Similar Threads
- drop down list question. (ASP.NET)
- How to make selected index zero for dropdown list box in java script..? (JavaScript / DHTML / AJAX)
- Populate One Drop Down List From Another (ASP.NET)
- Populating a Drop-down List (PHP)
- please anybody to help Dropdownlist selected index problem (ASP.NET)
- view employee info for the employee selected from the drop down list (PHP)
- How to get a selected index from checklistbox (ASP.NET)
- Passing a drop down list item's value (HTML and CSS)
Other Threads in the ASP.NET Forum
- Previous Thread: How to calculate and compare DateTime with Integer(c#)
- Next Thread: Pass value from one page to other page
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos application asp asp.net bc30451 bottomasp.net browser button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fill flash form formatdecimal forms formview gridview homeedition hosting iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers






