| Author |
access URL's using asp
|
|
| kartheek.bv@gmail.com 2006-11-28, 6:56 pm |
| i hav opened an URL from my local host using ASP but the problem is
that i am not able to access the fields in that URL.Here is how it
goes...............................
file name : 1asp
<form name="ass" action="2.asp" method="post">
<br><br>
<INPUT TYPE = submit VALUE = "SUBMIT">
</form>
file name : 2asp
<%
set IEObject = CreateObject("InternetExplorer.application")
IEObject.Left = 75
IEObject.Top = 75
IEObject.Width = 400
IEObject.Height = 300
IEObject.Menubar = 0
IEObject.Toolbar = 1
IEObject.Navigate "http://localhost/myweb1/project/verify.asp"
IEObject.Visible = 1
IEObject.document.authority("uname").Value="mylogin"<---The error is
here
%>
The problem is that i need to fill the text box named "uname" in the
"verify.asp" file.
Thanks in advance.........................
| |
| Bob Barrows [MVP] 2006-11-28, 6:56 pm |
| karth .bv@gmail.com wrote:
> i hav opened an URL from my local host using ASP but the problem is
> that i am not able to access the fields in that URL.Here is how it
> goes...............................
>
> file name : 1asp
>
> <form name="ass" action="2.asp" method="post">
> <br><br>
> <INPUT TYPE = submit VALUE = "SUBMIT">
> </form>
>
> file name : 2asp
>
> <%
> set IEObject = CreateObject("InternetExplorer.application")
> IEObject.Left = 75
> IEObject.Top = 75
> IEObject.Width = 400
> IEObject.Height = 300
> IEObject.Menubar = 0
> IEObject.Toolbar = 1
> IEObject.Navigate "http://localhost/myweb1/project/verify.asp"
> IEObject.Visible = 1
Stop. This is totally wrong. You do not create windows that require user
interaction in server-side code. Why are you doing this?
> The problem is that i need to fill the text box named "uname" in the
> "verify.asp" file.
Again, why? This code is running on a server ... no user involved. What
are you planning to do after that text box is filled in?
I think you need more help than can be gotten in a newsgroup. Start
here:
http://msdn.microsoft.com/library/e...ef33a651779.asp
Then go to www.w3schools.com and look at some of their tutorials
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
| |
| kartheek.bv@gmail.com 2006-11-28, 6:56 pm |
|
Thank you Mr.Bob Barrows for ur valuable suggestion.But u totally
misunderstood me.I am not going to give any user interaction for the
server code.The problem is that i'll hav to fill the text box too on
the server sid application itself.
| |
| Bob Barrows [MVP] 2006-11-28, 6:56 pm |
| karth .bv@gmail.com wrote:
> Thank you Mr.Bob Barrows for ur valuable suggestion.But u totally
> misunderstood me.I am not going to give any user interaction for the
> server code.
You may think you aren't, but in actuality you are. What do you think is
going to happen when this line is executed:
> IEObject.Visible = 1
Answer: a visible window is going to appear on the server's monitor (if
it is turned on ... )
And if that window generates a modal dialog box for some unforeseen
reason, nobody is going to be sitting at the keyboard to respond to it.
What do you think is going to happen to the inetinfo process in which
asp is running? Do you think subsequent web pages will be served?
Lesson: do not attempt to automate ANY programs that normally require
user interaction in server-side code. This includes IE, Notepad, Office
applications, etc.
> The problem is that i'll hav to fill the text box too on
> the server sid application itself.
Again ... why? What is your goal here?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
|
|
|
|