Jump to content

Finding the ID of a radio button


CO_

Recommended Posts

Hi everyone!

 

I'm not a php programmer but have been thrust into it by my Boss... and I'm having Trouble finding out the ID of this set of Radio Buttons :( I reckon it's somethin very simple that I have just missed out...

The code is as follows (not mine):

<tr><td>
<input type="radio" name="st" value=0 checked >125 Markt-Städte<br>


<input type="radio" name="st" value="1.2">aktuell gültige Kreise (402)<br>
<input type="radio" name="st" value="1.3">alte Kreise (440)<br>
<input type="radio" name="st" value="1.1">alte** & neue* Kreise<br><input type="radio" name="st" value=3 >Regionen (ROR)<br>
<input type="radio" name="st" value=2 >Alle Gebietseinheiten<br>
<br>
<input type="radio" name="st" value=6 >Ø Werte ABCD-Städte<br>

</td><td width=150>
<input type="radio" name="topic" value="BU" >Büro<br>
<input type="radio" name="topic" value="EH">Einzelhandel<br>
<input type="radio" name="topic" value="GE">Gewerbe<br>
<input type="radio" name="topic" value="WO">Wohnen<br>
<input type="radio" name="topic" value=""checked>Alle<br>

</td>
</tr>

A bit of Background... I'm using VBA to access the Website and then automate the selection of the Buttons and stuff...

 

Any bit of help would be very much appreciated!

 

CO_

Link to comment
Share on other sites

I assume you're trying to process the form results in php, and you're having trouble finding out which radio buttons are set?

 

I just did a quick google search and found this tutorial which looks like it could help you out. If you follow through that and then still have questions, come back and we can help further.

http://webcheatsheet.com/PHP/form_processing.php

 

 

Denno

Link to comment
Share on other sites

Hi W,

 

Thanks for the quick reply!

 

The code below is

<input type="radio" name="topic" value=""checked>Alle<br>

</td>
</tr>

<tr><td colspan=2>
<input type=submit value=" Städteliste ändern ">
</form></td></tr>

</table>
</td><td><form method=post action="tablelist_join.php3"><select name=ctylist[] multiple size=15><option  value=05313000>Aachen<option class=Auswahl value=08417079>Albstadt<option

There are no further references to form...

 

How would I go about automating the Buttons and/or form?

 

Tahnks!

 

CO_

Link to comment
Share on other sites

Ok, by automate you mean that when the user visits the page some radio buttons should be automatially checked, so the user doesn't have to do it?

 

In a radio button you can add checked within the tag, like so:

<input type="radio" name="topic" value="WO" CHECKED>Wohnen<br>

You can also add disabled to make it impossible for the user to check it.

 

- W

Link to comment
Share on other sites

I'm using Excel to access the Website (VBA) the way it works (or i hope it will):

 

User opens Excel, makro launches and acces the Internet, selects all the relevant Options (which are always the same) and Downloads then the relevant info.

 

Then the user can carry on working on his/her database. The Radiobuttons are whithin a Webpage that I have no Access to (ie, can't modify their code)

 

The particular radiobutton that I need is

<input type="radio" name="st" value=2 >Alle Gebietseinheiten<br>

Denno, it Looks interesting the tutotrial, do you know if i can integrate it to VBA?

 

thanks so far guys! :D

Link to comment
Share on other sites

Ok, by automate you mean that when the user visits the page some radio buttons should be automatially checked, so the user doesn't have to do it?

 

In a radio button you can add checked within the tag, like so:

<input type="radio" name="topic" value="WO" CHECKED>Wohnen<br>

You can also add disabled to make it impossible for the user to check it.

 

- W

 

Strictly, it should be

 

checked="checked"

 

but if you then add "disabled" the button value is not sent with the form data

Link to comment
Share on other sites

I've stopped following you guys... are you suggestign I can change the script at will? If it helps the line of code that is trying to interact with the script is:

 

Set ieRadio = ie.Document.getElementById("*ID*")
ieRadio.Item("st")(2).Checked = True

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.