0

Basically there is a MOSS 2010 site, and it contains a list of all user IDs that have accepted some terms. Of course these terms must be presented, and they should try to impede site navigation without accepting them. The trouble is that the page they will access is editable only in HTML, so I can use Javascript as the only scripting engine.

So there is Site1 - Sharepoint, Site2 - HTML page.

  1. User visits Site2 for first time, gets terms.
  2. The user clicks Accept, it is recorded in a Sharepoint list located at Site1, terms disappear and the user sees regular website Site2

Security is the last problem. So let's assume the user is already logged in to the Sharepoint site.

I've tried iframes, but security asks for same domain/port/protocol.

2 Answers 2

1

Use JSONP. Send whatever data you need to as arguments in a URL that is set as the src of <script> element. Have the requested page return whatever data you need as JavaScript. That script will be executed and can do something like call an onaccepted() function in your page.

Sign up to request clarification or add additional context in comments.

2 Comments

I see new means to accomplish something, however I don't follow your solution to this problem. I'll check it out though, maybe I'll understand once I start implementing. Thanks.
@AlexanderMP - I'd try to be more specific, but it's not clear to me where you are stuck. If you can elaborate on which specific part of your problem is giving you trouble, that would help.
0

user sees regular website Site2

I am confused with statement above. You have written that site2 is just an HTML page. If that is the case I will just assume that site 2 refers to an HTML page which must be presented to the first time user when he is visiting Site1.

You can achieve this with a simple code on the default page.

  1. Set default.aspx as the default page of Site1.

  2. When the user visits Site1, a small piece of code runs, may be as a webpart or a delegate, which checks if the incoming user is in the Accepted terms list. If yes, it does nothing, else it redirects to site2.html.

  3. The site2.html is a regular html page with Accept or Reject button. Upon accept, you will have to utilize Jquery code to put the user into the list once he clicks accepts.

1 Comment

No, not really. Site2 is not created by me, is not an ASPX website, has nothing to do with sharepoint. He visits Site2 directly, which is absolutely independent from Site1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.