Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Execute the query string before page load  RSS feed

 
sam sami
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to display images on my webpage which are stored on Sharepoint, for that I am trying to find out solution.

So I want to know.

1) Is there is any way, so I can execute query string(https://xyz.sharepoint.com/login.srf?username=aaa%40abc.com) before page load.

2) Is there any javascript that I can use for auto login.

Please let me know if there is any other way we can do it.
 
Stephan van Hulst
Saloon Keeper
Posts: 7927
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain a bit more about the flow of your application, what's supposed to happen, where you're logging in, etc.?
 
Matt Keller
Ranch Hand
Posts: 32
1
Eclipse IDE Java jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your approach seems to be not correct.  You don't want to download a username/password to the client, and then use that to get images from server.  Having the user name and password on the browser will make them available to the world.  However, if you don't care about anyone knowing the username and there is no password then your approach is okay.

1) If you are going to load the username to the client and you have no concern about security then use something like jquery's document ready function to go get your images using an asynchronous call.  Keep in mind though that if your images are on a different server than your page came from that this operation is not allowed by the browser and is called cross site scripting.  However, there are some work arounds for this including special javascript libraries.

2) If you password does need to be protected, then you should have your web application server go get your images for your browser.  The browser will only talk to your web application server and the web app server will act as a proxy to the images server, relaying the images through itself to the browser.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!