• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Execute the query string before page load

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.?
 
Ranch Hand
Posts: 32
1
jQuery Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic