eval(String) not working in firefox
eval() in firefox
Collapse
X
-
Tags: None
-
-
threads merged ... don't double post the same question ...
to your problem: eval() is definitly working in FF ... post the code that makes the problem ... probably we need to see more then the eval line especially where you create/retrieve the string that you want to evaluate ... give an example for that string
kind regardsComment
-
here is the problem with code
[CODE=javascript]if(questiontype == 'DA'){
var monthValue = "document.getEl ementById('mont h_"+sectionid+" _"+questionid+" ')";
var month = trimString(eval (monthValue).va lue);
var dateValue = "document.getEl ementById('date _"+sectionid+"_ "+questionid+"' )";
var date = trimString(eval (dateValue).val ue);
var yearValue = "document.getEl ementById('year _"+sectionid+"_ "+questionid+"' )";
var year = trimString(eval (yearValue).val ue);[/CODE]Comment
-
you just don't need to use eval here ... just use:
[CODE=javascript]var month_id = 'month_' + sectionid + '_' + questionid;
var month = document.getEle mentById(month_ id).value;[/CODE]
typically eval() is never needed, except when you need to eval json-data.
kind regardsComment
Comment