Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Nov 18, 2017 2:43 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Logging into and displaying web page in HTMLViewer
PostPosted: Fri Mar 22, 2013 11:46 am 
Offline

Joined: Fri Nov 14, 2008 3:44 pm
Posts: 62
Hi everyone,
attempting to do something I've never done before, and I'm confusing myself more and more so I thought I'd post here and see if anyone has done something similar and could offer advice.

I've got an internal CRM application, and one of the functions I'm working on is for it to access and display the company's internal Wiki page (where company procedures are stored, etc). This is a normal mediawiki setup. The user info for logging into the CRM are mirrored for the user info for the Wiki (editing rights, etc).

Basically, I need to access the Mediawiki api to log in, set a session cookie, and then use HTMLViewer to display the Wiki with the user already logged in.

But from what I can understand, there's nothing that ties HTTPSocket to HTMLViewer.

I am able to log in automatically using HTTPSocket and parsing the login request, then retrieving the session cookies and such. When I send the results to the HTMLViewer, the page has the user logged in. But any additional navigate, the user is not logged in any more - as the htmlViewer does not have a way to access the HTTPSocket's session cookies.

Is there any way to do this? Have the HTTPSocket automatically log into a webpage and have the cookies saved so the user can navigate the webpage on the HTMLViewer?

Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Logging into and displaying web page in HTMLViewer
PostPosted: Fri Mar 22, 2013 2:51 pm 
Offline

Joined: Fri Nov 14, 2008 3:44 pm
Posts: 62
I think I might have figured it out.

When the HTTPSocket finishes it's login authentication and gets it's cookies, it posts back to itself the main url.

In the HTTPSocket.PageReceived event, it sets a RePost bool to FALSE and then activates HTMLViewer.LoadURL and passes the URL.

In the HTMLViewer.DocumentBegin event, if the RePost bool is TRUE, it cancels itself and then reposts the URL to the HTTPSocket, otherwise it sets the RePost bool to TRUE.

Basically the HTTPSocket handles the navigation and successfully keeps it's cookies. When the user clicks on a link in the HTMLViewer it cancels any further HTMLViewer processing and then posts the url to the HTTPSocket, which then handles the interaction and sends the url back to HTMLViewer to load it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group