Welcome, Guest
Username: Password: Remember me

TOPIC: Buttons stop working on form screen

Buttons stop working on form screen 2 years 3 months ago #84193

  • DonMartin
  • DonMartin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
I am running LS 1.92+ Build 120405 (Ubuntu, Apache). I have a question with a google map that requires data input, for this I am using some custom JavaScript with a custom HTML form, this works perfectly.

However, the Next/Previous/Submit buttons on this question do not work on Internet Explorer, they work fine on Firefox and Chrome. I thought it was the JS causing the issue but have found it is the form itself or more precisely the closing form tag </form>.

The error I get is:

Message: 'document.limesurvey.move' is null or not an object

Here is the HTML that is causing the issue, note that this works as it should and LS works as it should if the closing form tag is removed:

<form name="maptype" action="">
<input type="text" id="address1id" name="address_one" />
<input type="text" id="address2id" name="address_two" />
<input type="button" name="mapsubmit" value="Get my route" onclick="getmap();" />
</form>

So I can get it to work but is there anyway I can resolve this so I am using the HTML correctly and getting LS to work?
The administrator has disabled public write access.

Re: Buttons stop working on form screen 2 years 3 months ago #84198

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4372
  • Thank you received: 830
  • Karma: 381
I suspect that the problem is that you are putting a form inside a form which is invalid HTML. (the survey elements are in <form id="limesurvey">)

I think you should be able to leave out both the opening and closing <form> tags.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Buttons stop working on form screen 2 years 3 months ago #84241

  • DonMartin
  • DonMartin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Thank you. I got hung up on placing the inputs within a form, as you say having the form within the existing LS form was causing the error. I should have realised right away.

I have removed both the opening and closing form tags and it works perfectly. It is strange how this error only showed itself when using IE but was ignored by other browsers.

Thank you for your help.
The administrator has disabled public write access.

Re: Buttons stop working on form screen 2 years 3 months ago #84243

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4372
  • Thank you received: 830
  • Karma: 381
You're welcome.

Yeah, IE is VERY sensitive about valid HTML and JavaScript.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.109 seconds
Donation Image