|
I'm not familiar with the MFC stuff, but in this case you need to specify the proxy server before accessing the resources on the internet. You may look at the parameters in the object constructor, or you can post this question in the C++ forum.
|
|
|
|
|
Actually the implement is not urgent, What I need the most is to mimic the environment!That is when everything set up, once I open IE for browing, I'll get a dialog box asking for user name, password and which domain you're in!
|
|
|
|
|
|
|
There is a setting in the Http stuff you are using to tell it to use the existing IE settings when connecting. That would do the trick.
|
|
|
|
|
Hey minhpc_bk,
If the user is already logged on to the network and authenticated, is there some way to set it up so that Windows authentication doesn't pop up the login dialog?
Matt Gerrans
|
|
|
|
|
Hi Matt,
It all depends on the browser the user uses to browse the application and the windows authetication mode applied to the application. For example, the ASP.NET application is using the Integrated Windows Authentication (best suited for an intranet environment), if the client uses the IE browser, then the login dialog does not pop up as the IE will first use the current Windows logon information to send to the server. If the authetication fails, the browser then prompt the user for a user name and password. For non-Microsoft browsers like FireFox ..., you may need to check their documentation, but AFAIK the FireFox by default prompts the user with the login dialog box.
|
|
|
|
|
Hi:
Later I find out that our customer's web environment is exactly the same as you said. They used ISA Server, your reply did help me thanks.
And now I trying to configure the our environment using ISA, in which I install the ISA Server on Win 2k Advanced Server(two network adapters installed, one is connected to the internet, one is connected to the Lan). The internal networks' IP range is (..167.0 - ..167.255) in ISA, the Lan network adapter's IP is ..167.10. . I pointed the client's proxy server to ISA's Lan IP. When everything is done, I really get promoted for a username and password under the basic authentication method!
But I wonder How to configure the client's username and password!
|
|
|
|
|
One of the scenarios here is to set up an ISA server in a domain, and what you need to do is to configure the system policy for the ISA server 2004. There are a couple of rules which can apply to the Authentication services, for example the Active Directory rule is selected. When a client in the domain wants to access the resources on the internet through the web proxy server(ISA server), he first needs to provide his account in the domain(username and password). The ISA validates this info against the domain controller to see if this is a valid account in the domain or not, then the client can proceed or has to provide a valid account. So the ISA server needs to be set up in a domain so that it can access the list of all accounts in the domain, then you can configure the rule in the way you want. You can take a look at this document for more information.
ISA Server 2004 System Policy[^]
Also, you can find the resources from the sites provided in my previous reply:
http://www.microsoft.com/isaserver/techinfo/guidance/2004/configuration.mspx[^]
http://www.isaserver.org/[^]
|
|
|
|
|
Thanks again!I'll look up the reference!
|
|
|
|
|
I have a mainpage that will load a ascx and within this ascx I have also a few RequiredFieldValidator. This work fine until I try to load a button server control to acts as a close window button ('X'). This button will try to dispose off the ascx but due to RequiredFieldValidator it does not postback and unload the ascx. How can I achieve this task with Javascript? Can anyone help?
TIA
|
|
|
|
|
Hi there,
You simply set the CausesValidation property of the button to false to make sure that all the validators will be ignored when you press the button.
|
|
|
|
|
Hi minhpc_bk.
Thanks for your help, the solution works. Again thanks a lot. As an alternative, I did actually saw a block of javascript solution for my problem mentioned earlier, but unfortunately I lost it. If you have the Javascript solution, please do tell me.
Thanks again.
|
|
|
|
|
Alternatively, you can use the javascript to disable all the validators stored in the Page_Validators array, and this script is registered to the onclick event of the web server button. I'm not sure it's that what you saw earlier.
|
|
|
|
|
is there a way to do this? I have a data capturing program that I'm writing where we host our own webbrowser object on a vb form. when the user submits info on a specified page, the info is also saved in the legacy sql server database. there's validation that we can impose for the sql server stuff, but the rest of the validation is done through javascript on the page. Is there a way to access the values of javascript variables through the webbrowser object so that my app can know whether or not it validated through their checks also. we only want the stuff saved in the sql server database if it validates through their javascript code also. any help is appreciated
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Hi there,
IMO, you are not able to directly access a javascript variable through the webbrowser object, however, with the webbrowser control you basically can access all html elements on the web page. So you can save the value of a javascript variable in a hidden element, then you can retrieve the hidden element via the webbrowser object. One more thing that you also need to specify when the application can access the hidden element. The sample code below demonstrares how to get the value of a hidden element when the button is clicked:
....
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)axWebBrowser1.Document;
mshtml.HTMLDocumentEvents2_Event iEvent = (mshtml.HTMLDocumentEvents2_Event) doc;
iEvent.onclick += new mshtml.HTMLDocumentEvents2_onclickEventHandler(iEvent_onclick);
...
private bool iEvent_onclick(mshtml.IHTMLEventObj e)
{
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)axWebBrowser1.Document;
mshtml.IHTMLInputHiddenElement hidden = (mshtml.IHTMLInputHiddenElement)doc.getElementById("hiddenID");
MessageBox.Show("Value: " + hidden.value);
return true;
}
|
|
|
|
|
Thanks. But the problem is that we aren't able to change the web page because it's made by a third party, so we can't add hidden elements to the page (or any elements, for that matter). The user has to put client info into a state database through their website, and they used to have to put all that same info into their own database. our program just captures it before it's submitted so that they don't have to input the data twice. we don't have any control over how the website is made.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Somehow I missed the IHTMLWindow2::execScript[^] method which is able to execute the specified script. To query the value of a global variable, you can provide some script to perisist the value of the global variable somewhere for example the clipboard of the window object or any other properties:
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)axWebBrowser1.Document;
mshtml.IHTMLWindow2 win = doc.parentWindow;
object obj = win.execScript("window.clipboardData.setData(\"Text\",Page_IsValid.toString());","javascript");
mshtml.IHTMLWindow3 win3 = (mshtml.IHTMLWindow3)doc.parentWindow;
object pageIsValid = win3.clipboardData.getData("Text");
|
|
|
|
|
May be they dosen't provide the permission to write to that directory?
|
|
|
|
|
Dear group,
I am using the webBrowser's control as part of my project, i am wondering if there is a method in the Internet Explorer's API which identifies if an element is visible or not.
Supposingly you have got a website where scrolling is needed, that is if you want to read all the web page's content you will need to scroll down to see the rest of the web page. My question is:
Is there a method which tells you if (for example, an image) is visible on the screen or whether it is not ???
Please this is very important in my project, can anyone help !
Thank you
Adam
|
|
|
|
|
Well..
You can check the size of the window and then check the position of the image.
Note however that the position of the image is reltive to the child element if that has the attribute position: set to "realtive" or "absolute".
Yea.. and you have to check how much the window has scrolled also...
<br />
The functions to use are:<br />
document.body.offsetWidth<br />
document.body.offsetHeight<br />
<br />
<object>.offsetLeft<br />
<object>.offsetTop<br />
<object>.scrollLeft<br />
<object>.scrollTop<br />
<object>.style.pixelLeft<br />
<object>.style.pixelTop<br />
By the way, these are the Explorer specific functions...
/M
|
|
|
|
|
Thanx for the advice Mattias,
but i still have a problem,
thats part of my code;
CComQIPtr<ihtmlelement2,&iid_ihtmlelement2> element(pDis);
long scrollTop;
element->get_scrollTop(&scrollTop);
Once I print scrollTop, the result is always 0 !!!
Do you have got any idea why this is happening ???
thanx in advance
Adam
|
|
|
|
|
There is a form in a html file.
Several controls , such as textbox, radiobutton, dropdown menu in the form.
All the values of the controls are needed.
How to check the values before invoke the submit button?
Thanks!
|
|
|
|
|
Hi:
You need to use a JavaScript which is wired up to onSubmit of the form and check in that function.
If all passes, return (true) to enable the browser go ahead with the form submission, else display a suitable message to the user and return (false) to request the browser to abort form submission.
Did this help you?
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
hi there , can a jsp page use 2 servlets or can a jsp page consists of 2 sql statemets. my database is postgres and server is tomcat ...
sql statements are the same as ms access ...
|
|
|
|