Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have multiple lines of JavaScript codes running in a Survey form "editForm.aspx". When I browse editForm.aspx directly it works well, but when I open the form by clicking 'respond to this survey' the dialog modal form opens and the JS code dos not run.

Do you have any idea?

share|improve this question
add comment

1 Answer

Please make sure your javascript at right location.

you should move you code inside

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

e.g

<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server">
<script id="onetidPageTitleAreaFrameScript">
document.getElementById("onetidPageTitleAreaFrame").className="ms-areaseparator";
</script>
</asp:Content>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.