473,792 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to select a radio button in internet explorer

1 New Member
Hy experts

I need a little help here. Can anybody tell me how to select
a radio button from another program knowing the name,id or text of the radio button.
I want to automate internet explorer by checking the "First Name" radio button then pressing the "Send" button.

This is the code I'm using to get the focus to internet explorer:

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Text;
  3. using System.Windows.Forms;
  4. using System.Runtime.InteropServices;
  5.  
  6. public class getWindow
  7. {
  8.   [DllImport("user32.dll")]
  9.   public static extern IntPtr FindWindow(string IpClassName, string IpWindowName);
  10.  
  11.   [DllImport("user32.dll")]
  12.   public static extern int SetForegroundWindow(IntPtr hWnd);
  13.  
  14.   public static void Main(string[] args)
  15.   {
  16.     IntPtr iHandle = FindWindow(null," Details - Windows Internet Explorer");
  17.     SetForegroundWindow(iHandle);
  18.   }
  19. }
  20.  
Any help would be appreciated.
Thank you in advance.
Mar 2 '11 #1
1 2157
HaLo2FrEeEk
404 Contributor
I'm not sure exactly how to go about doing this, but a good start might be figuring out what messages IE takes and see if you can send a message to the address bar, then send some javascript to check the radio button.
Mar 4 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2415
by: james.dixon | last post by:
Hi I was wondering if anyone else had had this problem before (can't find anything on the web about it). I have three select elements (list boxes - from here on I'll refer to them as 'the list boxes'). Users can add and remove items from the list boxes. When the users are adding and removing items, the list boxes are single
3
4139
by: Simon | last post by:
Hi, I need to prevent Internet Explorer to save the page in history collection when it is in PostBack. To try do this I have put this code: protected override void OnLoad( EventArgs evt) { if (IsPostBack) Response.Cache.SetNoStore(); ..... base.OnLoad( evt);
1
2813
by: kebabkongen | last post by:
Hi, I'm working on a JavaScript that is enabling / disabling a select element according to whether a checkbox is selected or not. This works fine in Firefox, but in Internet Explorer (v 6.0.2900) it appears wierd: When I disable the selevt element in IE, it continues to appear as enabled (falsely) until I try changing it. When I click on it, updates itself as grey as to indicate that it is disabled.
2
12443
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck into converting into code.
1
2332
by: poopsy | last post by:
hi all, i' hav this question where i have a radio button and select one of 2 choices, whichever i select hav to display in the input box but it doesnt work here is the code <html> <head> <script language="JavaScript"> function display(){ { frm_browser.txt_display.value=frm_broswer.txt_browser.checked.options.value
2
1184
by: sejal17 | last post by:
hello I want to select radio button with the database value. i have three radio button: <input type='radio' name='method' value='Paypal' checked='check'>Paypal <input type='radio' name='method' value='Creditcard'>Credit Card <input type='radio' name='method' value='Paypalmobile'>Paypal Mobile i have inserted that vaue in database as it is selected or checked.noe when i edit my form i want to that the radio button is selected...
5
26323
by: pravinnweb | last post by:
I have a form with lots of select boxes with fixed widths in order to fit in with the design. The problem I have is that some of the values in the options are much wider than the select box so the text in the options is cut off at the width of the select box. In firefox etc the options just expand to the width of the values but not in IE, so if there is a long bit of text in the option, much of it is cut off. How can I make the options appear...
2
3157
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several...
3
3663
by: kiranbabu | last post by:
<html> <head> <h2 align=center>Blank Tapes Status Form</h2> <br><title>Blank tapes status</title> </head> <body> <br><br> <form name=tapes_status method=post>
1
3398
by: Izzy123 | last post by:
how do we auto selected a radio button when the user enters a numeric value in a textbox? my code for radio button and text box are as follows: <li>Do you like your membership priviledge? <br /> <input type="radio" name="think" id="yes" value="yes"> <label for="yes">Yes</label> <br /> <input type="radio" name="think" id="no" value="no">
0
9670
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10430
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9033
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.