?
Solved

Fill in form with Java

Posted on 2012-03-31
11
Medium Priority
?
211 Views
Last Modified: 2012-06-21
I have a net4 app with a page that has several panels.  

One of the panels contains a link to a third party application.  

That application presents a form in the panel.  The form has a username text box and a login control.  There is no html associated with the third party app other than the link.

I would like to fill in the text box with the username I have obtained earlier in the session from the user, and then programmatically click the login control in the third party panel.

I do not know Java, but I suspect it might do the trick.  

Thanks in advance.
Cgee
0
Comment
Question by:williecg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
11 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37792998
Java is not JavaScript.

Java in a browser would mean writing an applet. I assume you meant JavaScript

In either case you would need a signed script or applet to fill in a form on a third party website

Instead use a http connection in .NET, connect and get  the form and post it back to the 3rd party from your server
0
 
LVL 12

Expert Comment

by:jagssidurala
ID: 37793035
you have to send a parameters as url parameters (query strings) or cookies but your 3rd party app should recognize these parameters to assign username or what ever fields you want to prefill.
0
 

Author Comment

by:williecg
ID: 37793069
jagssidurala,

Thanks for your response. How can I find out what the query string would need to look like?
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 12

Expert Comment

by:jagssidurala
ID: 37793073
for ex: if 3rd party url is looks as below

http://www.3rdpartyurl.com/

so add your parameters as below.

http://www.3rdpartyurl.com?username=ABC&firstname=XYZ etc....
0
 

Author Comment

by:williecg
ID: 37793076
mplungjan,

Any suggestions on how best to use a http connection in .NET, connect and get  the form and post it back ?  I have not done that.  Thanks for the suggestion.
0
 
LVL 12

Expert Comment

by:jagssidurala
ID: 37793089
server controls itself maintains state and we can use the same to post the value......
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37793488
A google for dot net post
http://blog.brezovsky.net/
0
 

Author Comment

by:williecg
ID: 37798039
jagssidurala,

thanks, i tried several querystrings, but shooting in the dark.  if it does use querystrings, any way to see what i am sending to the server when i enter the data on my pc?
0
 

Author Comment

by:williecg
ID: 37798075
mplungjan,

thanks,  I don't do C#, but i found similar info for vb.  it seems to me i need info on what the server is getting from the client in order to post the correct information.

Any suggestions on how I can "see" what the client is sending to the server?
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 2000 total points
ID: 37798094
Get Firefox, install firebug, open NET console.

Or

Get IEHTTP for IE8

Or put a dumper on your server and replace the form action with that
0
 

Author Closing Comment

by:williecg
ID: 37800953
mplungjan,
Thanks, I loaded firebug and now I see what is being passed.  I think the http connection in .NET sounds promising.  At this point I know a lot more than when I asked the question.  I need to do some research to better understand so I can ask more focused questions.  I am awarding you the points, and appreciate your sharing.
Cgee
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question