CO_ Posted May 3, 2013 Share Posted May 3, 2013 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_ Quote Link to comment Share on other sites More sharing options...
yomanny Posted May 3, 2013 Share Posted May 3, 2013 (edited) It doesn't seem to have any ID actually. I assume you mean an ID for the whole form? I see no <form> tag either! - W Edited May 3, 2013 by yomanny Quote Link to comment Share on other sites More sharing options...
denno020 Posted May 3, 2013 Share Posted May 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
CO_ Posted May 3, 2013 Author Share Posted May 3, 2013 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_ Quote Link to comment Share on other sites More sharing options...
yomanny Posted May 3, 2013 Share Posted May 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
CO_ Posted May 3, 2013 Author Share Posted May 3, 2013 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! Quote Link to comment Share on other sites More sharing options...
Barand Posted May 3, 2013 Share Posted May 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
CO_ Posted May 3, 2013 Author Share Posted May 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
Barand Posted May 3, 2013 Share Posted May 3, 2013 Have you tried document.getElementsByName("st") Quote Link to comment Share on other sites More sharing options...
CO_ Posted May 3, 2013 Author Share Posted May 3, 2013 Yes. It throws the following error: "Runtime error '-2147467259 (80004005)': Automation error. Unknown Error" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.