JS Scripts not working in CS3

When I was using CS2 2 years ago I was asked to make a calendar for a client. I used a script from Adobe Exchange. I have been asked to do the same this year. I am now running CS3... however this is the first time I have used my scripting panel since I upgraded and am having some troubles.
I looked though a list of possible scripts and picked a few to try... But non of them seemed to work. I kept on trying more and more but none of them would run (even fairly new ones). I noticed that the file extentsion for this scripts is .JS but the scripts that come with CS3 is .JSX. I tried changing the extension but that did nothing.
When I double click on the script from the scripting pannel it does nothing. just a micro second of seeing the spinning wheel and then back to the normal cursor.
Any help? Am I missing something?
Also this is on a Mac OS

Thanks Dave
Based on the information you have posted I have been doing everything correctly. But I am still having no luck.
I did read an article by David Blatner on InDesign Secrets that talks about using the "Version" folders at http://indesignsecrets.com/using-old-scripts-in-cs3.php
He mentions at the end a tip for people having trouble:
>Bonus Script Troubleshooting Tip
>By the way, Ive gotten a couple of emails from people who simply cant get their scripts to run on their Mac. They even did clean installations and the scripts still dont work. I was flummoxed, but Ryan Russelldedicated InDesignSecrets fancame up with a solution that worked for him. He noticed (with the help of Adobes tech support) that some of his folder names on his hard drive were slightly wrong.
>Specifically, the folders in this path:
>User>Library>Preferences>Adobe InDesign>Version 5.0
>werent named the same as in this path:
>User>Library>Cache>Adobe InDesign>Version 5.0
>Apparently, thats all it takes for InDesign to break. He renamed the folders and all his scripts suddenly started working again. I dont know if that will help anyone else, but its worth looking into.
Now I had a look at both folders and compared the two... they appear to be completely different and don't seem to relate at all. I don't know what I should try based on this suggestion.

Similar Messages

  • [js] CS Scripting not working with CS3

    Hello,
    We had a JavaScript made for us that enabled the user to exchange certain text within a document.
    This script works fine with CS (Ver.3.0.1) but gives a JavaScript Error - #55, Error String: Object does not support the property or method 'findPreferences' with CS3 (Ver.5.0)
    I have tried 'tinkering' around with the scripting - but I have zero experience with JavaScript and have not found a solution.
    Additionally the people that wrote the initial script are not available.
    I have bought several books but they all seem like alien-language to me
    Below is the section of origional CS scripting.
    Can anyone point out to me WHY this script does not work with CS3?
    And WHERE I should start looking - changing?
    Thanks in advance for your help and guidence.
    Lee
    // Exchange the text
    function actProjectData(oneDoc, oneResult){
    app.findPreferences = null; app.changePreferences = null;
    oneDoc.search(undefined, true, true, oneResult[0],{appliedCharacterStyle:oneDoc.characterStyles.item(myProjectTitleCharStyleNa me)}, undefined);
    oneDoc.search(undefined, true, true, oneResult[1],{appliedCharacterStyle:oneDoc.characterStyles.item(myOfferNoCharStyleName)}, undefined);
    oneDoc.search(undefined, true, true, oneResult[2],{appliedCharacterStyle:oneDoc.characterStyles.item(myOfferDateCharStyleName) }, undefined);
    app.findPreferences = null; app.changePreferences = null;

    > Come to think of it, maybe it's easier to create a folder "Version 4.0 Scripts" under your scripts folder and place your CS script in there. Maybe that will do the trick. Should have thought of that earlier.
    Tried this, but it didn't seem to do anything... But certainly a 'try' worth.
    Currently playing around with the:
    > app.findTextPreferences.findWhat = "a";
    app.changeTextPreferences.changeTo = "b";
    oneDoc.changeText();
    I've got to the point where I have no error messages :-) Now I'm really flying.....
    Fact is - not all text and also the wrong text is replaced!!!
    I'm currently playing with the script to try and replace
    all texts with a given paragraph style with the entered text...
    Not proving to be simple for me, but I'm learning rather a lot!
    Now that doesn't sound very clear when I go back and read it!
    What I want to say is:
    Each page of the document has the project name, No & Date on it (each having their own paragraph style)
    so
    With this script it asks you the Project name, No. and Date and then goes
    through the whole document and replaces all instants of those texts with specific paragraph styles with the newly 'entered' text.
    Proving to be a little mountain for me - Thought it would only be a hill!

  • Add file name script not working in CS3

    I have this wonderful script (written by Brian Price) back in 2004 for PS7 that adds the file name to an image ( I use it for adding file names to small images to be used in a slideshow). It works great ion Photoshop CS, but when I try to use it as part of a batch action in CS3 it stalls on line 9. OIt works fine when run on just one image in CS3 . . . it just stalls when run as part of a batch action!
    Any help GREATLY appreciated!
    Many Thanks,
    Peter Thompson
    [email protected]
    www.photohawaii.com
    Here's the script:
    // this script is a variation of the script addTimeStamp.js that is installed with PS7
    //Copyright 2002-2003. Adobe Systems, Incorporated. All rights reserved.
    //All amendments Copyright Brian Price 2004 ([email protected])
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PERCENT;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = "";
    // Set font size in Points
    myTextRef.size = 30;
    //Set font - use GetFontName.js to get exact name
    myTextRef.font = "ComicSansMS";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 255;
    newColor.rgb.green = 255;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 5, 94);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    I have this wonderful script (written by Brian Price) back in 2004 for PS7 that adds the file name to an image ( I use it for adding file names to small images to be used in a slideshow). It works great ion Photoshop CS, but when I try to use it as part of a batch action in CS3 it stalls on line 9. OIt works fine when run on just one image in CS3 . . . it just stalls when run as part of a batch action!
    Any help GREATLY appreciated!
    Many Thanks,
    Peter Thompson
    [email protected]
    www.photohawaii.com
    Here's the script:
    // this script is a variation of the script addTimeStamp.js that is installed with PS7
    //Copyright 2002-2003. Adobe Systems, Incorporated. All rights reserved.
    //All amendments Copyright Brian Price 2004 ([email protected])
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PERCENT;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = "";
    // Set font size in Points
    myTextRef.size = 30;
    //Set font - use GetFontName.js to get exact name
    myTextRef.font = "ComicSansMS";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 255;
    newColor.rgb.green = 255;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 5, 94);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

  • Update Script Problem CS2 to CS3 ( Time/Date/Year Script NOT WORKING IN CS3?

    The below script works in CS2 but not in CS3? WHY?
    //DESCRIPTION: Use to insert date/time into document.
    if (app.documents.length == 0) { exit() }
    insertDTs(app.documents[0]);
    function insertDTs(aDoc) {
    var curPrefs = aDoc.characterStyles[0].extractLabel("dtprefs");
    if (curPrefs == "") {
    // Doc has no prefs; use saved prefs
    curPrefs = getCurPrefs(File(getScriptPath().absoluteURI.replace(/Insert\.jsx/, "Prefs.txt")));
    } // end if curPrefs
    var prefParts = curPrefs.split("\n");
    if (prefParts[2] != "[None]") {
    insertIt(aDoc, prefParts[0], prefParts[2]);
    if (prefParts[3] != "[None]") {
    insertIt(aDoc, prefParts[1], prefParts[3]);
    function insertIt(aDoc, formString, cStyleName) {
    var formStrings= ["Day, Month, Year"]
    var theFuncs = [dayMonthYear]
    var charStyleStrings = aDoc.characterStyles.everyItem().name
    if (indexOf(charStyleStrings, cStyleName) < 1) { return } // style not found or is No Style
    var func = indexOf(formStrings, formString);
    if (func < 0) { return } // requested form not recognized
    var dateString = theFuncs[func](new Date());
    app.findPreferences = app.changePreferences = null;
    aDoc.search("", false, false, dateString, {appliedCharacterStyle:cStyleName});
    } // end insertIt
    function dayMonthYear(date) {
    date.setDate(date.getDate()+1);
    // returns dayName, monthName date, year
    var myDateString = date.toLocaleDateString();
    myParts = myDateString.split(" 0");
    if (myParts.length != 1) {
    myDateString = myParts[0] + " " +myParts[1];
    return myDateString.slice(0,-5) + "," + myDateString.slice(-5);
    function indexOf(array, find,offs) {
    for( var i = offs == undefined ? 0 : offs; array.length > i; i++ ) {
    if( array[i]==find ) {return i}
    return -1;
    function getScriptPath() {
    // This function returns the path to the active script, even when running ESTK
    try {
    return app.activeScript;
    } catch(e) {
    return File(e.fileName);
    } // end try
    } // end getScriptPath
    } // end insertDTs

    It uses CS2-style searching is the most obvious problem.
    Try putting it in a folder named "Version 4.0 Scripts" -- without the quotes -- and run it from there.
    Dave

  • Font missing CS4 script not working in CS5???

    hi, my font missing script is working in CS3, and CS4 but not working in CS4.
    I don't know why, any help please.
    Sam

    Object model has some changes in CS5.
    So use the below code in top of your script.
    app.scriptPreferences.version = 6.0;

  • Script not working in SharePoint content editor webpart

    Hi All,
    <html>
    <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function () {
    //Call your function here like
    //retrieveListItems();
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "SP.js");
    var siteUrl = '/vceo/PMO/EPMO/';
    var close1 = ''; var close2 = ''; var high = ''; var low = ''; var medium = ''; var lowMedium = ''; var mediumHigh = '';
    var open1 = ''; var open2 = ''; var high1 = ''; var low1 = ''; var medium1 = ''; var lowMedium1 = ''; var mediumHigh1 = '';
    var count = 0; var count1 = 0;
    var initiate = 0; var planning = 0; var execution = 0; var closing = 0;
    var sumMinimal = 0; var sumModerate = 0; var sumCritical = 0; var sumSevere = 0;
    var sumHighlyLikely = 0; var sumLikely = 0; var sumSomewhat = 0; var sumUnlikely = 0;
    var sumBudget = 0; var sumCommitted = 0; var sumConsumption = 0;
    function retrieveListItems() {
    alert("Welcome to Dashboard");
    var clientContext = new SP.ClientContext(siteUrl); alert("site url");
    var oList = clientContext.get_web().get_lists().getByTitle('Project Issues and Risks');
    var oList1 = clientContext.get_web().get_lists().getByTitle('Project');
    var oList2 = clientContext.get_web().get_lists().getByTitle('Risk Impact');
    var oList3 = clientContext.get_web().get_lists().getByTitle('Risk Probability'); alert("get by title");
    var camlQuery = new SP.CamlQuery(); var camlQuery1 = new SP.CamlQuery(); var camlQuery2 = new SP.CamlQuery(); var camlQuery3 = new SP.CamlQuery(); var camlQuery4 = new SP.CamlQuery(); var camlQuery5 = new SP.CamlQuery(); var camlQuery6 = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Issue</Value></Eq></Where></Query></View>');
    camlQuery1.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Risk</Value></Eq></Where></Query></View>');
    camlQuery2.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Open</Value></Eq></Where></Query></View>');
    camlQuery3.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Closed</Value></Eq></Where></Query></View>');
    camlQuery4.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery5.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery6.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    this.collListItem = oList.getItems(camlQuery); this.collListItem1 = oList.getItems(camlQuery1); this.collListItem2 = oList1.getItems(camlQuery2); this.collListItem3 = oList1.getItems(camlQuery3);
    this.collListItem4 = oList2.getItems(camlQuery4); this.collListItem5 = oList3.getItems(camlQuery5); this.collListItem6 = oList1.getItems(camlQuery6);
    clientContext.load(collListItem); clientContext.load(collListItem1); clientContext.load(collListItem2); clientContext.load(collListItem3); clientContext.load(collListItem4); clientContext.load(collListItem5); clientContext.load(collListItem6);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    alert("retrieve list");
    function onQuerySucceeded(sender, args) {
    alert("succeed");
    var listItemEnumerator = collListItem.getEnumerator(); var listItemEnumerator1 = collListItem1.getEnumerator(); var listItemEnumerator2 = collListItem2.getEnumerator();
    var listItemEnumerator3 = collListItem3.getEnumerator(); var listItemEnumerator4 = collListItem4.getEnumerator(); var listItemEnumerator5 = collListItem5.getEnumerator(); var listItemEnumerator6 = collListItem6.getEnumerator();
    var sumClose = 0; var sumClose1 = 0; var sumHigh = 0; var sumMedium = 0; var sumLow = 0; var sumLowMedium = 0; var sumMediumHigh = 0;
    var sumOpen = 0; var sumOpen1 = 0; var sumHigh1 = 0; var sumMedium1 = 0; var sumLow1 = 0; var sumLowMedium1 = 0; var sumMediumHigh1 = 0;
    while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); sumClose += oListItem.get_item('Close'); sumOpen += oListItem.get_item('Open'); sumHigh += oListItem.get_item('High'); sumMedium += oListItem.get_item('Medium'); sumLow += oListItem.get_item('Low'); sumLowMedium += oListItem.get_item('LowMedium'); sumMediumHigh += oListItem.get_item('MediumHigh'); }
    while (listItemEnumerator1.moveNext()) { var oListItem1 = listItemEnumerator1.get_current(); sumClose1 += oListItem1.get_item('Close'); sumOpen1 += oListItem1.get_item('Open'); sumHigh1 += oListItem1.get_item('High'); sumMedium1 += oListItem1.get_item('Medium'); sumLow1 += oListItem1.get_item('Low'); sumLowMedium1 += oListItem1.get_item('LowMedium'); sumMediumHigh1 += oListItem1.get_item('MediumHigh'); }
    while (listItemEnumerator4.moveNext()) { var oListItem4 = listItemEnumerator4.get_current(); sumMinimal += oListItem4.get_item('Minimal'); sumModerate += oListItem4.get_item('Moderate'); sumSevere += oListItem4.get_item('Severe'); sumCritical += oListItem4.get_item('Critical'); }
    while (listItemEnumerator5.moveNext()) { var oListItem5 = listItemEnumerator5.get_current(); sumUnlikely += oListItem5.get_item('Unlikely'); sumSomewhat += oListItem5.get_item('Somewhat'); sumLikely += oListItem5.get_item('Likely'); sumHighlyLikely += oListItem5.get_item('HighlyLikely'); }
    while (listItemEnumerator6.moveNext()) { var oListItem6 = listItemEnumerator6.get_current(); sumBudget += oListItem6.get_item('Project_x0020_Budget_x0020_Amoun'); sumCommitted += oListItem6.get_item('Committed_x0020_Budget'); }
    count = this.collListItem2.get_count();
    count1 = this.collListItem3.get_count();
    while (listItemEnumerator2.moveNext()) {
    var oListItem2 = listItemEnumerator2.get_current();
    var stat = oListItem2.get_item('Project_x0020_Status');
    if (stat == "Intiation") {
    initiate = initiate + 1
    if (stat == "Planning") {
    planning = planning + 1
    if (stat == "Execution") {
    execution = execution + 1
    if (stat == "Closing") {
    closing = closing + 1
    //alert("initiate" + initiate); alert("planning" + planning); alert("execution" + execution); alert("closing" + closing);
    //alert("countOpen" + count); alert("closed:" + count1);
    window.close1 = sumClose; window.close2 = sumClose1; window.high = sumHigh; window.low = sumLow; window.medium = sumMedium; window.mediumHigh = sumMediumHigh; window.lowMedium = sumLowMedium;
    window.open1 = sumOpen; window.open2 = sumOpen1; window.high1 = sumHigh1; window.low1 = sumLow1; window.medium1 = sumMedium1; window.mediumHigh1 = sumMediumHigh1; window.lowMedium1 = sumLowMedium1;
    drawChart();
    function onQueryFailed(sender, args) { alert('Request failed.. ' + args.get_message() + '\n' + args.get_stackTrace()); }
    google.load("visualization", "1", { packages: ["corechart"] });
    function drawChart() {
    var data = google.visualization.arrayToDataTable([['Task', 'Issues'], ['Close', window.close1], ['Open', window.open1]]);
    var data1 = google.visualization.arrayToDataTable([['Task', 'Risks'], ['Close', window.close2], ['Open', window.open2]]);
    var data2 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high, window.mediumHigh, window.medium, window.lowMedium, window.low]]);
    var data3 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high1, window.mediumHigh1, window.medium1, window.lowMedium1, window.low1]]);
    var data4 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Closed', count1], ['Open', count]]);
    var data5 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Initiation', initiate], ['Planning', planning], ['Execution', execution], ['Closing', closing]]);
    var data6 = google.visualization.arrayToDataTable([['Program', 'Impact'], ['Minimal', sumMinimal], ['Moderate', sumModerate], ['Severe', sumSevere], ['Critical', sumCritical]]);
    var data7 = google.visualization.arrayToDataTable([['Program', 'Probability'], ['Highly Likely/Probable(76%-100%)', sumHighlyLikely], ['Likely(51%-76%)', sumLikely], ['Somewhat Likely(26%-50%)', sumSomewhat], ['Unlikely/Improbable(0%-25%)', sumUnlikely]]);
    var data8 = google.visualization.arrayToDataTable([['Project', 'Budget'], ['Approved', sumBudget], ['Committed', sumCommitted]]);
    var options = { title: 'Program Issues', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options1 = { title: 'Program Risks', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options2 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options3 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options4 = { title: 'Project Status', width: 225, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options5 = { width: 175, height: 200, legend: { position: 'top', maxLines: 10 }, pieSliceText: 'value', };
    var options6 = { title: 'Program Risk Impact', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options7 = { title: 'Program Risk Probable', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options8 = { title: 'Project Budget', width: 300, height: 300, legend: 'bottom', pieSliceText: 'value', };
    var chart = new google.visualization.PieChart(document.getElementById('chart_div3'));
    chart.draw(data, options);
    var chart1 = new google.visualization.PieChart(document.getElementById('chart_div'));
    chart1.draw(data1, options1);
    var chart2 = new google.visualization.ColumnChart(document.getElementById('chart_div1'));
    chart2.draw(data2, options2);
    var chart3 = new google.visualization.ColumnChart(document.getElementById('chart_div2'));
    chart3.draw(data3, options3);
    var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4'));
    chart4.draw(data4, options4);
    var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5'));
    chart5.draw(data5, options5);
    var chart6 = new google.visualization.PieChart(document.getElementById('chart_div6'));
    chart6.draw(data6, options6);
    var chart7 = new google.visualization.PieChart(document.getElementById('chart_div7'));
    chart7.draw(data7, options7);
    var chart8 = new google.visualization.ColumnChart(document.getElementById('chart_div8'));
    chart8.draw(data8, options8);
    </script>
    </head>
    <body>
    <table >
    <tbody>
    <tr>
    <td id="chart_div8" colspan="2" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div4" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div5" style="border-bottom:ridge;border-right:ridge;border-top:ridge"></td>
    </tr>
    <tr>
    <td id="chart_div" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div2" style="border-bottom:ridge;"></td>
    <td id="chart_div3" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div1" style="border-bottom:ridge;border-right:ridge""></td>
    </tr>
    <tr>
    <td id="chart_div6" colspan="2" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div7" colspan="2" style="border-bottom:ridge;border-left:ridge;border-right:ridge"></td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>
    This content editor webpart not working in sharepoint page. Once I checked out to the page then chart is working. When i checkedin function not get called. How to fix this?
    THanks in advance!

    In SharePoint 2013, sp.js and sp.runtime.js does not load on the page in published mode. You need to explicitly load these files. You can check using IE developer tools in the Script section that in published mode these files are missing.
    In order to fix this issue explictly refer these two js files on your page.
    <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="_layouts/15/sp.js"></script>
    Geetanjali Arora | My blogs |

  • Simple button script not working

    I am using AS2 and need help figuring out why this simple button script is not working:
    stop();
    buttonWS1.onRelease = function(){
                        gotoAndStop("Stage1and2_Boss",4);
    buttonWS2.onRelease = function(){
                        nextFrame();
    //end
    My buttons are the square letter-puzzles below. They are images that I converted to "symbols" (specifically, buttons). I put their names as above (buttonWS1, buttonWS2, etc.) in the "instance names" boxes.
    I have no idea what is going on. Please help!

    Hi -
    1. Yes, buttonWS2 is the instance name
    2. The only code attached to it is the code I pasted above.
    3. onRelease does not execute because my trace statement does not appear in the output
    Here is the modified code for buttonWS2:
    buttonWS2.onRelease = function(){
                        trace("clicked!");
                        nextFrame();
    Question: It shouldn't matter if I have commented-out code within that set of codes should it?:
    buttonWS2.onRelease = function(){
              //if (puzzleschosenarray[0] == 2 || puzzleschosenarray[1] == 2) {
              // cannot be chosen -- make button non-functional
              //else{
                        //puzzleschosenarray[roundnumber-1] = 2;
                        trace("clicked!");
                        nextFrame();

  • Published SWFs not working from CS3 on Mac?

    This one REALLY has me stumped..
    I am working on a Mac Dual 2-Gig G5 running OS 10.4.10 and
    Flash CS3.
    I have a web site for a client posted (
    http://www.aronwiesenfeld.com
    ). This site has been running flawlessly for over a year published
    to Version 8 Flash Player AS v2.0. This client asked me to create a
    new temporary splash page last night that would announce his new
    Art Show and then click on into the main site. This site uses a
    Shared Lib, a SharedTrigger, a Core SWF (containing the main site
    navigation elements and handles loading of various movies into
    levels) and a Splash SWF (that contains the two splash screens and
    initial navigation to areas of the site. The problem I THINK I am
    having is in the Splash SWF... or is a problem with my LOCAL Mac
    installation? When I click one of the 5 Site Nav buttons it is
    supposed to tell the main core movie to advance to a new frame (20)
    and I target that movie by referring to _level0. This has worked
    fine for the past year (on this and other sites). I am attaching an
    example of the code used on each of the initial Nav buttons in the
    Splash swf .
    So here is the mystery...
    When I "Test Movie" inside Flash CS3, everything works/looks
    "perfect". If I then go to the desktop and find the generated HTML
    file and open it in Safari (both version 2 and 3-beta), or Firefox
    or Opera, etc., everything looks fine until I click one of the
    initial text Nav Buttions. At that point it takes me to the main
    site and loads the external SWF into a level as it should
    (indicating that the 3rd line of code on the button is execution
    and by the fact the the Splash movie disappears, it indicates that
    the core movie is indeed moving to frame 20 (_level0) as requested
    in the first line of code. However, all of the main site navigation
    buttons along the bottom of the main site as well as the background
    NEVER APPEAR? Also when I start to move the mouse around the loaded
    external movie the site completely crashes and I get a blank screen
    - IN ALL BROWSERS whether I am launching the site from my hard
    drive or the Internet!! But it works perfect INSIDE Flash CS3.
    Now comes the real kicker...
    Just for the heck of it after spending 3 hours trying to fix
    this on my main G5 tower(publishing to Player version 9, etc.), I
    decided to try accessing the site from my old G4 laptop. Ready for
    this? The site appears to be working perfectly IN ALL BROWSERS ON
    MY G4 also running 10.4.10!!!
    So my guess is maybe their is a problem with the Flash Player
    Plugin in all my browsers on my G5 or the Flash Plugin has a
    problem with OS 10.4.10 only on my G5. BUT, even if I launch this
    site directly in Flash Player from the desktop on my G5 it does not
    work - so the stand-alone player is having the same issue - yet it
    works fine on my G5 INSIDE of Flash CS3.
    I thought I had seen it all the last 5 years with Flash, but
    this one has be completely stumped!
    My client emailed me from California and said the site was
    working fine there of his PC. If that is true then I am having a
    LOCAL Flash Player problem on my G5 running 10.4.10.
    In addition to my question, if anyone can give me feedback as
    to whether or not this site is working on your machine/browser/OS,
    could you please let me know? You will know if the site is working
    if you click on Enter Site, then click on any of the 5 buttons
    (except Info) and you see a grey background behind the image and
    the lower navigation string appears.
    Thanks!

    Well after trying everything I could think of I started down
    the list again. I re-downloaded the Flash Player 9 r47 Mac
    installer and ran the installer again (which I also did last night
    with no success).
    This time after re-installing the plugin - ALL THE BROWSERS
    IMMEDIATELY STARTED WORKING ad the site now comes up fine - so,
    apparently I had a bad Flash Player install in my browser!

  • Java script not working in 1 pdf, but same script is NOT working in other

    Dear Experts,
    I have a problem with java script.
    I have created 2 PDFs with the same Form name and sub form names.
    I have written a javascript and this script seems to be working in one (Demand2.pdf) and NOT working in the other (Sample.pdf).
    The link for Demand2.pdf is
    https://acrobat.com/#d=XIydWx1RIU4oNdTySHtHfg
    and the link for sample.pdf is
    https://acrobat.com/#d=sKPRs2dtDY57RSvMVtnh3w
    Can you please guide me on this.
    Many Thanks
    BookFans

    Hi,
    The second file (Sample.pdf) is saved as Static. The script is changing the visual appearance of the form (showing and hiding objects). This requires the file to be saved as a Dynamic PDF. This is available in the save-as dialogue under the file name.
    Good luck,
    Niall

  • Logout Script not working in 10.9.3 Mavericks

    Sorry for the duplicate post, but this issue is with MacBook Pro not iMac.
    Can anyone tell me why this logoutscript will not work using LogouHook in Mavericks.  The exact same script worked with Lion and Mountain Lion.
    #!/bin/csh
    ## CCS-Checkout Logout Script
    if ( $USER == 'ccs-checkout' ) then
    #first, unlock all files
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/*
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/.Trash/
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/.??*
    #then, delete all of the files
    /bin/rm -R /Users/ccs-checkout
    #copy a "clean" version of the ccs-checkout users home directory
    /usr/bin/ditto -rsrcFork /var/skel/ccs-checkout /Users/ccs-checkout
    #ensure that the users directory exists and set the privs
    /usr/sbin/chown -R ccs-checkout:wheel /Users/ccs-checkout
    /bin/chmod -R 775 /Users/ccs-checkout/
    #make sure trash is empty
    /bin/rm -R /Users/ccs-checkout/.Trash/
    #make sure trash dir exists and set privs for trash and dot files
    /bin/mkdir /Users/ccs-checkout/.Trash
    /usr/sbin/chown -R ccs-checkout /Users/ccs-checkout/.??*
    /bin/chmod -R 700 /Users/ccs-checkout/.??*
    endif
    exit 0
    The script will run in terminal when copied and pasted from #first, unlock all of the files to exit 0.
    When I run defaults write com.apple.loginwindow LogoutHook /usr/local/bin/LogoutScript the date on the com.apple.loginwindow.plist file changes so it is being modified.
    Apparently there is something in:
    #!/bin/csh
    ## CCS-Checkout Logout Script
    if ( $USER == 'ccs-checkout' ) then
    That Mavericks does not like or won't execute.
    To duplicate this issue on your MBP make a user named ccs-checkout with normal permissions and autologon.  After the first logon of the ccs-checkout user log out and log on as root and copy the ccs-checkout users local profile to the /var/skel/ folder.  Then make the above script into an executable .sh file named LogoutScript and place it in the /usr/local/bin/ folder and run the above LogoutHook.
    Thanks for any help with this issue.

    This is the part of code where script fails. In 9.2 I haven't any kind of problems.
                        think(0.1);
                   forms
                   .tree(100,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .expandNode(
                        "X");
                        think(0.1);
                   forms
                   .tree(101,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .selectNode(
                        "XY");
                        think(0.1);
                   forms
                   .tree(102,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .activateNode(
                        "XYZ");
                        think(0.1);
                   forms
                   .textField(103,
                        "//forms:textField[(@name='INFO_BLOCK_IZBRANA_ZAVAROVANJA_0')]")
                        .setFocus();
                        think(0.1);
                   }

  • [JS CS5] Re order pages script not working for me

    Hi, I'm attempting to use the reorder script marked as the answer in this post :
    http://forums.adobe.com/thread/519470
    My problem is that when it reorders the pages, it puts them all into one spread and errors once it reaches 10.
    Some details on what I am doing -
    It's an 18 page document, reorder is as follows:
    1,2,4,18,17,5,6,16,15,7,8,14,13,9,3,10,11,12
    Currently it's in spreads, but even when I turn off facing pages, move each page by itself and turn the master into one page, I still have the same error. I've been fighting with this a while, I've tried each of those by themselves as well.
    In case you are curious about the order - this is a booklet, but the middle signature is 3 pages. I'm attempting to create a script that will take it from reader to printer spreads as "print booklet" will not work because of the 3 page signature (extra page is a fold out on finished product).
    I'm fairly new to scripting and feel it must be something obvious I'm just missing.
    Thank you for your time!!

    @Krista – I suggest you ask in the thread you are pointing to with your link.
    No need to split the thread into two.
    Now to your problem:
    if all the pages end up in one spread it is no surprise that you get an error after page 10. The maximum page count of one single spread is 10.
    Why do the pages go to one spread?
    It's pure speculation, but I think it has to do with some preconditions your spreads are in.
    Check for "Allow Document Pages to Shuffle" and "Allow Selected Spread to Shuffle".
    Is "Allow Selected Spread to Shuffle" "off" or "on" for the particular spread where all pages are added?
    And another question:
    what is the particular script you refer to? There are a couple of scripts in this thread from various authors.
    Uwe

  • VBA-script not working in InDesign

    Goal: To have text placed from Word formatted in the paragraph styles I like. I receive the text from other authors and they are formatted with standard Word paragraph style formatting.
    Two solutions:
    Format the text in Word (change paragraph styles) using VBA, place/import it and somehow make sure that InDesign uses the styles I already defined in InDesign, not the way that style is defined in Word. I can't figure out how to do this.
    Do the formatting in InDesign, using script. But the VBA-macro does not work in InDesign.
    How may I change the code in order to work in InDesign? The code should look for specific paragraph styles and change them or the style of the next paragraph.
    Sub stilSkifte()
    Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="1"
    Dim para As Paragraph
    For Each para In ActiveDocument.Paragraphs 'søk gjennom hvert enkelt avsnitt i dokumentet
       On Error Resume Next
        'INGEN MELLOMROM og overskriftene
        If para.Range.Style = "Ingen mellomrom" Then
            para.Style = "Normal"
            GoTo SisteLinje 'Gå til linja i koden som heter SisteLinje, = gå til neste avsnitt
        End If
        If para.Range.Style = "Overskrift 1" Then
            para.Style = "Tittel-små"
            GoTo SisteLinje 'Gå til linja i koden som heter SisteLinje, = gå til neste avsnitt
        End If
        If para.Range.Style = "Overskrift 2" Then
            para.Style = "Ingress"
            GoTo SisteLinje 'Gå til linja i koden som heter SisteLinje, = gå til neste avsnitt
        End If
        If para.Range.Style = "Overskrift 3" Then
            para.Style = "mellomtittel"
            GoTo SisteLinje 'Gå til linja i koden som heter SisteLinje, = gå til neste avsnitt
        End If
        'NORMAL til BYLINE
        If para.Range.Style = "Ingress" Then
            If para.Next.Style = "Normal" Then
                para.Next.Style = "byline1"
            End If
               GoTo SisteLinje
        End If
        If para.Range.Style = "byline1" Then
            If para.Next.Style = "Normal" Then
                para.Next.Style = "byline2"
            End If
               GoTo SisteLinje
        End If
       'Hvis avsnittet er i NORMAL og det neste er...
        If para.Range.Style = "Normal" Then
            '...i NORMAL endres dette til NORMAL M INNRYKK
            If para.Next.Style = "Normal" Then
                para.Next.Style = "Normal med innrykk"
            End If
            GoTo SisteLinje
        End If
    SisteLinje: Next
    End Sub
    I apriciate any suggestions!

    Thank you Kasyan, but it doesn't work as I expected it to. The InDesign style are somtimes overridden, sometimes not. It seems to have something to do with wether the Word-style is based on another Word-style or not. In addition I have my InDesign styles grouped, and when InDesign upon placing a text doesn't find the style on the top level, it imports the Word-style.
    My solution:
    Change Word-styles so they are not based upon another style
    Running the VBA-code in Word
    Placing the text using "Use InDesign style definition" for paragraph and character styles conflicts.
    Editing the imported InDesign styles so that they are based upon and equals the original InDesign style in the respective group

  • Ajax Script not working in IE (window.XMLHttpRequest)

    Hi,
    I have written following code in ajax.
    This is a javascript function called on onchange event of a button.
    This code works fine in firefox and chrome but does not work in IE8.0+
    the values don't get displayed.
    plz suggest me if there is any change.
    thnx in advance.
    <script type="text/javascript">
    function showUser(str) {
      if (str=="") {
        document.getElementById("userDetailsShownHere").innerHTML="";
        return;
      if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
      } else { // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
          document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
          document.getElementById("btn").name=str;
            showGift(str);
      xmlhttp.open("GET","getuser.php?username="+str,true);
      xmlhttp.send();
    //This code will execute on button click
    function showGift(str) {
        var life = document.getElementById("lifeLabel").value;
        var number = parseInt(life, 0);
        if(number == 55){      
            if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
          } else { // code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200) {
              document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
             document.getElementById("btn").name=str;
           document.getElementById("btn").style.display="inline";
          xmlhttp.open("GET","getuser.php?username="+str,true);
          xmlhttp.send();
        else if(number > 0){
          document.getElementById("noLife").style.display="none";
            number = number - 1;
          if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
          } else { // code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
           xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200) {
              document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
              document.getElementById("btn").name=str;
            document.getElementById("btn").style.display="none";
             if(document.getElementById("cometomorrow") || document.getElementById("win")){
                document.getElementById("btn").style.display="none";
                console.log("hide");
              }else{
                setTimeout("showButton()", 1000);
          xmlhttp.open("GET","getgift.php?username="+str+"&loop="+number,true);
          xmlhttp.send();
        else {
        document.getElementById("userDetailsShownHere").innerHTML="";
            document.getElementById("noLife").style.display="inline";
        document.getElementById("btn").style.display="none";
    </script>

    Hi Vishalika,
    Please post questions about html, css and scripting for website development to
    MSDN
    IE Web Development forum is moving to stack-overflow
    xmlhttpRequests is not available to webpages using the file: protocol in MSIE browsers.
    If possible include with your questions a link to your website or a mashup that shows the issue.
    If you are running the webpage from your file system (file: protocol), please advise as such.
    f12>Debug tab to debug your webpage scripts and include any error messages from the console with your scripts... (however xmlhttprequests to local resources do not cause errors in the Developer tool console).... you should always test your web applications
    from an actual web server first (localhost).
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Rob^_^

  • Java script not working

    Hi all
    I have a web dynpro abap application with an adobe interactive form. In the form I want to make certain fields read only. To do this I am using java script. It works fine from the livecycle designer in preview mode but when I run the wd4a nothing happens - like the java script is not being executed. I tried changing the Adobe form properties to Acrobat 8 (Dynamic) XML form but it still does not work. Any ideas?
    I'm using ALD 8.0, sapgui 710, Netweaver 7 SP 22 and IE8
    Regards

    Have you checked that you can see the access property, for example, with a message box?
    xfa.host.messageBox(xfa.form.D8.Page2.<my field>.access);
    Also try accesing the field directly
    <my field>.access = "readonly";
    Do you have any script working in your form?
    Regards, Aldo.
    Edited by: Aldo Velazquez on Dec 9, 2010 4:36 PM

  • Serial number not working on cs3 download for mac

    I downloaded cs3 through prodesign tools but my serial number is not working does that mean I installed it on too many computers. I only have it on my old desktop now which I'm using to print from my epson 3800 and I'm a little scared to uninstall that. Can I just use the cs3 trial for now and enter the serial number lately. Will  the cs3 trial mess up downloading the cs5 trial? Thx, Mark

    mwerbe wrote:
    I downloaded cs3 through prodesign tools but my serial number is not working does that mean I installed it on too many computers. I only have it on my old desktop now which I'm using to print from my epson 3800 and I'm a little scared to uninstall that. Can I just use the cs3 trial for now and enter the serial number lately. Will  the cs3 trial mess up downloading the cs5 trial? Thx, Mark
    What message does it fail with, specifically?  That would help answer your question.
    If you can no longer deactivate your Photoshop CS3 license from an old system because it's no longer running, you may well be able call Adobe's customer support line and get them to reset the activation information in their server database for you, by explaining your situation to them.
    -Noel

Maybe you are looking for