|
Hi ,
I am submitting a html form in ASP.NET 1.1, to a websphere server. I am browsing excel file and submitting through object to Websphere server, by sybmitting form with action as Websphere hosted address.
Whenever I login to app, and try to upload the file with above functionality, for the first time, I get redirected to Login.aspx automatically. But when I re-login again and does the same thing as above, the file is uploaded successfully.
Can you please help me regarding this, as I have maintained releative values of timeout for session and form-authentication in web.config file.
- Ajay K
|
|
|
|
|
Instead of using
void Navigate2(
LPCTSTR lpszURL,
DWORD dwFlags = 0,
LPCTSTR lpszTargetFrameName = NULL,
LPCTSTR lpszHeaders = NULL,
LPVOID lpvPostData = NULL,
DWORD dwPostDataLen = 0
);
to send the post data by myself.
Can I use anyother method to send the posted data automatically.
What I mean is that can I still wait at CHtmlView::OnBeforeNavigate2 and just change some of the posted data but let others untounched? Hence, the main problem is that how can I press the "submit" button automatically after I receive the form.
Thanks very much for any help given!
|
|
|
|
|
Hi Friends,
IHtmlDocument2::get_cookie() doesn't give other information of cookie like domain name, path, secure etc. The API does say that get_cookie will give name=value pairs plus other possible values like secure, domain name, expire and path but i am getting only name=value pairs.
Does any one know, how to get these other information ? any sample ?
Thanks,
--Amish
|
|
|
|
|
It gives me this error, while running ur executable
A breakpoint has been reached
(0x800000003) occurred.....
Click on OK..
Click on Cancel
Why it is so??/
regards
Balkrishna Talele
|
|
|
|
|
Dir, Could you tell me how to the form values form the document?
Thanks,
|
|
|
|
|
Dir, Could tell me how to the form values form the document?
Thanks,
|
|
|
|
|
Hi,
When I post something like:
äöüß :/\
I'll get:
%E4%F6%FC%DF+%3A%2F%5C
Well, I don't mind as long as there's a way to re-convert them to 'plain ascii' or at least something close to it...
|
|
|
|
|
Is ist possible to bind the CHtmlView to a opened RAS Connection, for example to use a RAS Connection over GPRS and not over a LAN?
Thanks in advance
M. Hackstock
|
|
|
|
|
Hi Ted!
I am testing your project and when I run it (in debug mode), the debug window shows this message. How can I solve this problem and remove this message?
..............
First-chance exception in TestHTML.exe (GDI32.DLL): 0xC0000005: Access
Violation.
First-chance exception in TestHTML.exe (GDI32.DLL): 0xC0000005: Access
Violation.
..............
Thank you very much. Bye
Vicente Manuel
|
|
|
|
|
I get the same exceptions, and in release mode, I get an application error. This typically happens when I execute the code twice (submit the form twice). Any ideas about what's causing the exception or how to avoid it?
The exception seems to occur in CWnd::AttachControlSite.
I know this post is over a year old now, but hopefully someone else has seen this problem
JC
|
|
|
|
|
|
Hi Ted
Looked at your DHTMLUI library, a project sample will be appreciated, if you can please
Thanks
Alex
|
|
|
|
|
I have been working with the updated DHTML user interface library in my own project and as such I have not been able to write the article to accompany the library. The library has a tremendous number of functions and options and is capable of implementing virtually *all* of the functionality associated with MSIE 5.5.
Functions currently working:
- IDocHostUIHandler<->View interface 100%
- DocHostUI Option Support 100%
- IDocHostShowUI<->View interface 100%
- IDispatch<->MFC Automation support 100%
- DHTML Extension Support 100%
- Find On This Page Dialog 100%
- View Source 100%
- IE Options Dialog 100%
- INPUT Element processing 100%
- TEXTAREA processing 100%
- SELECT/OPTION processing 100%
- Buttons & Checkboxes 100%
- Performance Tweaking 90%
- CodeProject Article 5% (Ack! No Time!)
- NEW: IE v5.5 Extended Event Handling w/Overrides - 100%
- NEW: Full Internet Explorer 5.5 support - 100%
- NEW: Advanced Context Menu Handling - 100%
- EXTENDED: Custom Controls 100%
I have been cleaning up the source code, documenting the undocumented parts and making sure that the classes remain backward-compatible with the original CHtmlView. I have shortened the name of the new view class to simply CHtmlViewEx
As-is, the classes use an MFC dispinterface on the CDocument attached to the view, the source is documented to show how to change this if you want it elsewhere.
I am hoping to get this done and packaged before too long, as I know some of you could really use this. If there is any functionality you are interested in, drop me a line and I'll see what I can do. If I cannot get the time to write a full article, I may just post the library as-is with only the in-source documentation and a demonstration of it's use.
Thanks,
Ted Cro
|
|
|
|
|
I see that your announcement is a couple of months old. Have you finished the new class yet? I'm very anxious to use it.
-- Johnas
|
|
|
|
|
Actually, it is about as complete as it's going to be for now... but I haven't had the time to get it out on CodeProject.
I will try to post it as soon as I am able...
Ted Crow
|
|
|
|
|
You can use a sink to get all the events you need and rewrite the (let's call it) ISinkDispatcher's Invoke method.
As a brutal way, I "invented" and INVOKEPARAM structure (which contains all the parameters of Invoke, ISinkDispatcher
being derived from DWebBrowserEvents2 interface), use another interface (let's call it) IWebOleClientSite
(derived from IOleClientSite, IOleInPlaceSite and IDocHostUIHandler) as manager of your client site and you can
intercept ISinkDispatcher::Invoke by filling an INVOKEPARAM structure and sending in as LPARAM in an user message to
the parent window. That could be something like:
HRESULT STDMETHODCALLTYPE
ISinkDispatcher::Invoke(DISPID dispId, REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HRESULT hr = E_NOTIMPL;
IWebOleClientSite *pCS = (IWebOleClientSite *)GetClientSite();
if(pCS)
{
INVOKEPARAM InvokeParam;
InvokeParam.dispId = dispId;
InvokeParam.lcid = lcid;
InvokeParam.wFlags = wFlags;
InvokeParam.pDispParams = pDispParams;
InvokeParam.pVarResult = pVarResult;
InvokeParam.pExcepInfo = pExcepInfo;
InvokeParam.puArgErr = puArgErr;
SendMessage
(
pCS->m_hWndOwner,
WM_USER_DISPINVOKE,
(WPARAM)dispId,
(LPARAM)&InvokeParam
);
}
return hr;
}
(or invent a new notifications and send/post it using WM_NOTIFY, since the Web Browser is usually hosted by another
window as parent - usually a dialog - and in parent window catch WM_NOTIFY with your user notification code, as in
ordinary Windows WM_NOTIFY approach).
Read DWebBrowserEvents2 to see what you have to return, the header file <dispid.h> is also very useful, or use notify
reflection, or anything else. But that could be a way (the rest are details).
Sooner I'll post a sample "from the scratch", using C++ but no class libraries, about how to host a WebBrowser control inside a dialog hosted by a MDI child window. Stay tooned
|
|
|
|
|
One thing I am trying to avoid mixing ATL into my MFC project. At this point in my project, mixing ATL into it would be more trouble than it's worth.
While I am familiar with ATL, and understand the benefits, I can get to what I need fairly easily through MFC (Even if some of the things I am doing are undocumented!).
I personally plan to base some of my future modules on ATL or another lightweight framework, but I'll cross that bridge when I come to it.
Thanks,
Ted Cro
|
|
|
|
|
I did a project using CHtmlView not too long ago, one big problem was that setcookie failed. It is possible that coookies only work in a real browser. I think you one has to intercept javascript/vbscript parser to make this work. I will be thrilled to see someone enlight me on this.
|
|
|
|
|
Well, I know that if you get the interface to the IHTMLDocument2 from the CHtmlView, you have access to IHTMLDocument2::get_cookie and IHTMLDocument2::put_cookie. I haven't played with these interfaces myself, but you might look at them in the Platform SDK to see if it's what you're looking for. If you are interested in sample code I'll whip some up for you.
Later,
Ted Crow
|
|
|
|
|
Hey Ted,
Great piece of work. I'll be very interested in your latest version.
How would you make available to HTML pages (resources on an mfc project)a database object(ADO)?
My idea is to have an application that has browser functionality and that is able to connect to a database locally (on a disconnected lap top, not on a server or network or the internet, so asp's are out). In that way I can use the niceties and simplistic approach of HTML and database access functionality provided by ADO. I can also use my ADO object as a single point of access to the database from a number of HTML pages.
I am familiar with mfc but not too comfortable yet with COM. But I'll dig in if that's the way to go.
I could not find any examples that access a local database using ADO from a web page (maybe I am going blind).
Thanks! Jos
|
|
|
|
|
You article says that you can handle VBScript and JavaScript. From my experience, this is only half true. If you navigate to a script you can intercept the call, but I have not found a way to intercept a general script call. I'd love to know if you have a solution to this problem
|
|
|
|
|
I am currently working on a class called CHtmlFormView, which I plan to post here on The Code Project when complete. It will demonstrate full two-way communication with forms. This class is a heavily modified CHtmlView with specialized operations for dealing with HTML Forms.
In this package I plan to include a sample using a custom application interface which is callable from VBScript and/or Javascript. The project I am currently working on will be using this functionality.
By implementing a custom dispatch, you would be surprised at how useful the "window.external" interface can become -- just have a look in the Platform SDK.
Even better - navigate your Internet Explorer to "res://c:\WINNT\System32\shdoclc.dll/ABOUT.DLG" and have a look at the source. (you may have to change the link for Windows 9x, just find shdoclc.dll).
Thanks for the input...
Ted Cro
|
|
|
|
|
Hi, nice work..(I am very poor at English..)
BTW, what the meanig of the source..?
It displays about dialog of IE..
I wonder what is the operation of the dll you mentioned..
Is that IE COM..? What about mshtml.dll..?
One more thing,
how can I get the handle of edit box in IE that is dynamically created by tags like ??
I want to get the handle of it.
Not the contents It has.
If you think it is a windowless control, get me the
proper reason about your insist..
Thanks in advance..
Regardz
-Ra
|
|
|
|
|
I'm not sure which source you are referring to, so I'll touch on both.
The source in this article shows that you can get (semi)useful information out of forms, even when they are completely enclosed in an CHtmlView.
The source of the about box in IE shows scripts pulling information from the application itself, although in a limited way. MSHTML.DLL processes the html page and provides extensions to the DOM (Document Object Model) to give it access to the dialogArguments member mentioned in the scripts. My new view class will provide a means to easily add methods and properties to the DOM, which can really spice up a scripted page contained within the view.
So far, the class allows you to add your own context menus, extend the DOM with properties *and* methods, perform URL translation, and a few other things I will suprise everyone with.
About controls inside the view itself - if you use regular tags you don't get full access to the embedded control itself easily. I just checked out my own app with Spy++ and Edit boxes don't show up... maybe they are "windowless"... I noted though that comboboxes *DO* have a window associated with them.
I'll keep my eye out when I go spelunking in the bowels of the Platform SDK, but I personally don't need the handles to any of the controls.
Thanks for the input,
Ted Cro
|
|
|
|
|
Ted,
Wow, sounds like a great class you are creating! Can't wait to see it up on here, it should be very intresting to play with!!
|
|
|
|
|