access URL's using asp

K

kartheek.bv

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.........................
 
B

Bob Barrows [MVP]

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/en-us/iissdk/html/2c40c3cf-90eb-41ca-ae2a-0ef33a651779.asp

Then go to www.w3schools.com and look at some of their tutorials
 
K

kartheek.bv

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.
 
B

Bob Barrows [MVP]

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top