View Single Post
Join Date: Sep 2007
Posts: 1,080
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Solved Threads: 68
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: drop down list selected index change doesn't work in mozilla

 
0
  #4
Nov 8th, 2007
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:
  1. If Not Page.IsPostBack Then
  2. If Not Page.IsClientScriptBlockRegistered("IncludedJavascript") Then
  3. Page.RegisterClientScriptBlock("IncludedJavascript", "<SCRIPT Language=""JavaScript"" src=""javascriptincludedfile.js""></SCRIPT>")
  4. End If
  5. ddlid.Attributes.Add("onchange","javascript:callfunction(this);")
  6. End If
Last edited by SheSaidImaPregy; Nov 8th, 2007 at 1:03 pm.
Reply With Quote