Welcome, Guest
Username: Password: Remember me

TOPIC: Update has broken javascript functionality

Update has broken javascript functionality 2 years 3 months ago #77521

  • soon
  • soon's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
I include the script below in one of my questions (it displays a drawing of a body outline and lets users draw in their pain distribution).

I've done some updates.

The javascript doesn't work now :( Doesn't show at all. The HTML page source is here pastebin.com/aNb38WB0

I suspect there was a 'something' I changed manually in a config file, a template file or some other place, which has now been overwritten ... but can't think of where ... any suggestions?



<h1>
Aktuelle episodes ryg- og/eller bensmerters typiske udbredelse</h1>
<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

// Find the survey, group and question IDs
if($( 'input#fieldnames' ).length != 0) {
var fieldNames = $('input#fieldnames').attr('value');
var tmp = fieldNames.split('X');
var sID = tmp[0];
var gID = tmp[1];
var qIDStr = $('div.text-huge:eq(0)').attr('id');
var tmp2 = qIDStr.split('question');
var qID = tmp2[1];
}

var textAreaID = 'answer'+sID+'X'+gID+'X'+qID;

// Hide the textarea
$('#'+textAreaID+'').hide();

// alert('textAreaID ' + textAreaID + '.');


// Insert an element for the drawing tool
$('<div id="place"></div>').insertBefore($('#'+textAreaID+''));

// Load the drawing tool 'inputdraw.non-commercial.v1.5.swf'
var draw = new InputDraw('inputdraw.free-non-commercial.1.2.swf', 'place', {
id:textAreaID,
width:'400',
height:'418',
stroke_style:'2 1 rgb(255,0,0)',
animation:60,
background_image:'drawing_both_empty.gif',
color:'#CCCCCC' ,
tools_color:'0xd6c004',
clean:'clear.png',
undo:'undo.png',
disable:'size opacity color stroke' // Get rid of most of the tools
});

});

</script>
The administrator has disabled public write access.

Re: Update has broken javascript functionality 2 years 3 months ago #77543

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
1. Which Limesurvey version did youz previously use?

2. To which Limesurvey version did you update?

3. During update only the core files and files of shipped templates (which you shouldn't edit at all) will be update. Config.php isn't touched as well.

4. There is a backup of all changed files at /tmp if I remember correctly, so maybe you can check which files changed.

5. Due to the new Expression Manager, some problems might show up during update. Have a look at docs.limesurvey.org/Expression+Manager#H...ble_is_EM_with_1.91_

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.106 seconds
Donation Image