Click here to Skip to main content
15,895,084 members
Home / Discussions / Web Development
   

Web Development

 
QuestionNEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Ginozzzz11-Jan-09 10:19
Ginozzzz11-Jan-09 10:19 
Perhaps someone could tell me what is wrong with this script please. It doesn't work in FireFox.

<asp:Button ID="butAddImg" Text="Image?" runat="server" OnClientClick='return SetViewImg(this,"fuAddImg");' CausesValidation="False" />
<asp:FileUpload ID="fuAddImg" Enabled="false" runat="server" />


<script language="javascript" type="text/javascript">

function FindCont(SourceCont,ContToFind){
  
  var conPf_array = SourceCont.name.split("$"); //break the name down
  var countArray = conPf_array.length; //measure how many elements to the array
  var ContPath = (conPf_array[0] + "$"); //set initial value
  for (var i = 1; i <= (countArray - 2); ++i)  //set up loop
  {
   ContPath = ContPath + (conPf_array[i] + "$"); //build  string
  }
  ContPath = ContPath + ContToFind; //add control name
  
return ContPath;



function SetViewImg(controlToEval, fuContName) {
 var fuControl = FindCont(controlToEval, fuContName);
 if (document.getElementById(fuControl).disabled == true) {
  document.getElementById(fuControl).disabled = false;
  return false;
 }

 else {
  document.getElementById(fuControl).disabled = true;
  return false;
 }
}


Thanks in advance.

}
AnswerRe: NEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Aman Bhullar11-Jan-09 18:19
Aman Bhullar11-Jan-09 18:19 
GeneralRe: NEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Ginozzzz11-Jan-09 22:46
Ginozzzz11-Jan-09 22:46 
AnswerRe: NEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Not Active12-Jan-09 0:41
mentorNot Active12-Jan-09 0:41 
GeneralRe: NEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Ginozzzz12-Jan-09 1:28
Ginozzzz12-Jan-09 1:28 
AnswerRe: NEWBIE - Javascript only works in IE, not FF3.05 - Help! Pin
Ginozzzz12-Jan-09 7:31
Ginozzzz12-Jan-09 7:31 
QuestionExtended DynamicData Entity Pin
Adriaan Davel11-Jan-09 4:11
Adriaan Davel11-Jan-09 4:11 
AnswerRe: Extended DynamicData Entity Pin
Jon Rista12-Jan-09 6:58
Jon Rista12-Jan-09 6:58 
GeneralRe: Extended DynamicData Entity Pin
Adriaan Davel12-Jan-09 11:08
Adriaan Davel12-Jan-09 11:08 
QuestionJava Script Problem Pin
Anudeep Jaiswal - MCA9-Jan-09 20:28
Anudeep Jaiswal - MCA9-Jan-09 20:28 
AnswerRe: Java Script Problem : Please Ignore Pin
Abhijit Jana9-Jan-09 22:00
professionalAbhijit Jana9-Jan-09 22:00 
AnswerTHREE TIMES? .... Pin
leckey11-Jan-09 14:59
leckey11-Jan-09 14:59 
QuestionIE share SSL connection made by myself Pin
maoxintt9-Jan-09 16:49
maoxintt9-Jan-09 16:49 
Answer[Cross-Post ! IE share SSL connection made by myself] Pin
Garth J Lancaster9-Jan-09 18:31
professionalGarth J Lancaster9-Jan-09 18:31 
GeneralRe: [Cross-Post ! IE share SSL connection made by myself] Pin
maoxintt9-Jan-09 18:42
maoxintt9-Jan-09 18:42 
Questionhow to modify the html code before which loaded by browser? Pin
awayer9-Jan-09 13:36
awayer9-Jan-09 13:36 
QuestionRe: how to modify the html code before which loaded by browser? Pin
Shog99-Jan-09 13:59
sitebuilderShog99-Jan-09 13:59 
AnswerRe: how to modify the html code before which loaded by browser? Pin
JimmyRopes17-Jan-09 6:05
professionalJimmyRopes17-Jan-09 6:05 
QuestionAjax: Login via ModalPopupExtender issue Pin
Goalie359-Jan-09 11:00
Goalie359-Jan-09 11:00 
GeneralRe: Ajax: Login via ModalPopupExtender issue Pin
Shog99-Jan-09 14:00
sitebuilderShog99-Jan-09 14:00 
QuestionWeb Development Problem : Java Script Pin
Anudeep Jaiswal - MCA9-Jan-09 2:37
Anudeep Jaiswal - MCA9-Jan-09 2:37 
AnswerCROSS POST Pin
Not Active9-Jan-09 3:24
mentorNot Active9-Jan-09 3:24 
QuestionASP.NET 3.5 SP1 Server Side Viewstate Pin
L Viljoen8-Jan-09 23:13
professionalL Viljoen8-Jan-09 23:13 
GeneralRe: ASP.NET 3.5 SP1 Server Side Viewstate Pin
Shog99-Jan-09 14:01
sitebuilderShog99-Jan-09 14:01 
QuestionCrystal Report Print Icon does nothing Pin
Anoop Brijmohun8-Jan-09 21:58
Anoop Brijmohun8-Jan-09 21:58 

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.