Steven Weiss
Nuke Active Member Posts:23
|
05/11/2011 7:58 AM |
|
Hi, I am using Calculated Column from Form and List module, to call a Javascript function (and passing 5 Text column values, as parameters to that function). Everything works well and javascript gets call if the "Text Values" being passed are Short in length, but if the Text is Too Long, then Javascript call fails. Above is the only case with browser IE and works well with Firefox and Crome. Is there any limitation on charachter to be passed to javascript? |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
05/11/2011 10:16 AM |
|
I did some quick checking and testing and passed a string a couple of thousand characters in length to a function with no problem. Can you attach some code in a file and maybe I can spot something. Or, provide a link to a page that runs it. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Steven Weiss
Nuke Active Member Posts:23
|
05/12/2011 1:32 AM |
|
Hi, I have a simple Javascript function which takes input parameter string and displays all those in tabular form. On click of "Details" link the function "CreateFloatingDivCarrier" gets called. Following is the exact values I am passing to it.
<a href="javascript:CreateFloatingDivCarrier("Long Term Contract" , "$70,000 /year " , "Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Advanced Level Skills in MS Word such as keyboard short cuts, creating macros, merge, merge queries, templates, table techniques, and working with images and text. Advanced Level Skills in MS Project such as importing and exporting data to and from your project, connection to a Project Server, setting multiple project baselines, customizing columns in a table, creating custom views and reports, PERT analysis and project tracking, and maintaining project budget compliance Advanced Level Skills in MS Visio such as creating Visio diagrams, creating custom styles and templates, cross functional flow charts, linking drawings to other MS applications, working with data, custom reports, and exporting Experience with Warehouse Management System (WMS), and Inventory Analyst tools Experience with Statistical and/or Transportation Analysis Tools (Minitab, SAS, Metlab, i2, Tmod, ILPS) Experience with Visual Basic Admin. (VBA) / Sequential Query Language (SQL) " , "Minimum of four years of related experience is required. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. " , "Bachelors degree required in Engineering/Business/Supply Chain or a minimum of 8 years of relevant work experience. Minimum of four years of related experience is required " , "Engineering " , "Industrial Engineer " , "Hebron, Kentucky ");"> Details</a>
|
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
05/12/2011 9:59 AM |
|
Your problem is the " being used inside of the href which is itself enclosed in ". What you'll need to do is change all of the interior delimiters to '. So you will have something that looks like: <a href="javascript:CreateFloatingDivCarrier('Long Term Contract' , '$70,000 /year ' , ... ">Details</a>
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Joseph Craig DNN MVP Posts:11667
|
05/12/2011 2:15 PM |
|
Here is some ugly code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht...">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function CreateFloatingDivCarrier(a, b, c, d, e, f, g, h) {
document.getElementById("my1").innerHTML = a;
document.getElementById("my2").innerHTML = b;
document.getElementById("my3").innerHTML = c;
document.getElementById("my4").innerHTML = d;
document.getElementById("my5").innerHTML = e;
document.getElementById("my6").innerHTML = f;
document.getElementById("my7").innerHTML = g;
document.getElementById("my8").innerHTML = h;
document.getElementById("myList").style.visibility = "visible";
}
</script>
<style type="text/css">
ul
{
margin-left: 0;
padding-left: 0;
}
li
{
padding: 10px 0;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<a href="javascript:CreateFloatingDivCarrier('Long Term Contract' , '$70,000 /year ' , 'Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Advanced Level Skills in MS Word such as keyboard short cuts, creating macros, merge, merge queries, templates, table techniques, and working with images and text. Advanced Level Skills in MS Project such as importing and exporting data to and from your project, connection to a Project Server, setting multiple project baselines, customizing columns in a table, creating custom views and reports, PERT analysis and project tracking, and maintaining project budget compliance Advanced Level Skills in MS Visio such as creating Visio diagrams, creating custom styles and templates, cross functional flow charts, linking drawings to other MS applications, working with data, custom reports, and exporting Experience with Warehouse Management System (WMS), and Inventory Analyst tools Experience with Statistical and/or Transportation Analysis Tools (Minitab, SAS, Metlab, i2, Tmod, ILPS) Experience with Visual Basic Admin. (VBA) / Sequential Query Language (SQL) ' , 'Minimum of four years of related experience is required. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. Minimum of four years of related experience is required. Lean Six Sigma Green Belt Certification attainment is required within 12 months of hire. ' , 'Bachelors degree required in Engineering/Business/Supply Chain or a minimum of 8 years of relevant work experience. Minimum of four years of related experience is required ' , 'Engineering ' , 'Industrial Engineer ' , 'Hebron, Kentucky ');">
Show Details</a>
<div style="margin-top:20px; border-top:2px solid gray;">
<ul id="myList" style="visibility: hidden; list-style: none; display: inline-block">
<li id="my1"></li>
<li id="my2"></li>
<li id="my3"></li>
<li id="my4"></li>
<li id="my5"></li>
<li id="my6"></li>
<li id="my7"></li>
<li id="my8"></li>
</ul>
</div>
</form>
</body>
</html>
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Steven Weiss
Nuke Active Member Posts:23
|
05/16/2011 7:57 AM |
|
Hi, Thanks for your reply. But I am not using double quotes ("), while creating a string to be assigned to Calculated column (Details) Expression field I have written the Expression like: '<a href="javascript:CreateFloatingDivCarrier("'+Type+'" , "' +Salary+' " , "' +Description+' " , "' +Experience+' " , "' +Education+' " , "' +Category+' " , "' +Title+' " , "' +Location+' ");"> Details' Where all the columns passed as Parameter values are TEXT columns and the Details column is a calculated column. Am I wrong in writing this expression? And if yes, why does it works well with FireFox and Chrome
|
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
05/16/2011 8:44 AM |
|
I have no idea what is going on here, but ... do you know how to use the Developer Tools in IE to debug javascript? I would look to see what actually gets passed to your function. That should give you a clue about what is going wrong. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|