task pane call back - InfoPath Dev
in

InfoPath Dev

task pane call back

Last post 03-28-2006 09:42 AM by Richard. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 03-22-2006 05:21 PM

    task pane call back

    I am pointing my taskpane to the sharepoint site.
    a link in my site takes me to a html page under a directory that is excluded from the sharepoint service.
    I have a script in this page like this:
    <HTML>
    <script>
    var XDoc = window.external.XDocument;
    XDoc.View.SwitchView("View 1");
    </script>
    <BODY>
    // TESTING A SCRIPT IN SHAREPOINT TO SWITCH INFOPATH VIEW
    </BODY>
    </HTML>

    But when this page is hit, I get Internet Explorer script error, permission denied , ??

  • 03-22-2006 09:51 PM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35
    Hi,

    Permission is denied, error will occurr if InfoPath access any external objects in the scripting code (ie. where you put // TESTING A SCRIPT IN SHAREPOINT TO SWITCH INFOPATH VIEW commented code) with out having "fulltrust" level of security.

    I hope this will help you to solve your problem.
  • 03-23-2006 04:39 PM In reply to

    I tried to take out the comment line but still same error occured.
  • 03-23-2006 10:24 PM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35
    I tried with the same scriping code that you mentioned above, by publishing the form to a share point site. But it is working fine with out giving any errors.
    For this scenario the result is when I fill out the form, switch view function is called in the onload event itself, by this I can see the view which I mentioned in the switch view with the task pane for which I used the sample html file.

    The code sample which I tried is:
    <HTML>
    <script>
    var XDoc = window.external.XDocument;
    XDoc.View.SwitchView("view2");
    </script>
    <BODY>
    </BODY>
    </HTML>
  • 03-27-2006 06:05 PM In reply to

    thanks for your response, However try this to see the error :

    Form Options, Advanced , taskpane location :http://www.mysharepointsite.com

    In your sharepoint site create an xml web part page and in the xml source paste this:

    <A href="http://www.mysharepointsite.com/aspapps/mypage.html" > imi </A> </BODY>
    </HTML>

    now you have a link in your sharepoint site that takes you to the html page with that script in it..

    In my sharepoint site, I excluded the aspapps directory , and copied my page to there.

    so this way sharepoint should not complain.. but it seems that we still have problems with it..

  • 03-28-2006 12:00 AM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35
    While trying the scenario as you explained above, I committed one small mistake. Because of that I got the script error.
    I found it, and I fixed it. Then it work's fine.
    If you got the same script error, I think you did the same mistake.
    That is I didn't mention the correct view name which I created for the switch view.
    Please make sure the view name which you put in the switch view function while trying the scenario.
    The code sample which I tried is:
    <HTML>
    <script>
    var XDoc = window.external.XDocument;
    XDoc.View.SwitchView("view2");
    </script>
    <BODY>
    <A href="http://www.mysharepointsite.com/aspapps/mypage.html" > imi </A>
    </BODY>
    </HTML>
  • 03-28-2006 09:42 AM In reply to

    In my example, the link is in the sharepoint web part, totally separate than where the script is mypage.html . you seem to have them in the same page.

    I did not have a view name problem, since, outside of sharepoint the example works fine.

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.