damaya Posted June 16, 2010 Share Posted June 16, 2010 I have a text area where the user types in a domain, and below that I have two radio buttons, YES and NO, and this is what I want to happen, but not sure how to do it... If radio button YES is selected, then a lookup on the given domain happens, and a bunch of text boxes appear on the page. If the lookup of the domain finds any records (A, MX, CNAME, etc), then those fields are populated with the found values. If nothing is found, then the text fields are left blank. I'm just not sure I can assign an action to a radio button like that without the user having to hit a submit button... If radio button NO is selected, then a submit button appears on the page. The part I am really having trouble wrapping my mind around is having that radio button perform the action of checking the DNS records for the domain and then populating the fields on the same page without having to hit submit. Please let me know if there are any good tutorials on this, or anything to at least get me on the right track. I greatly appreciate it, thank you! Link to comment https://forums.phpfreaks.com/topic/204959-radio-button-that-populates-text-fields/ Share on other sites More sharing options...
kenrbnsn Posted June 16, 2010 Share Posted June 16, 2010 That can be done with Javascript. I would use a library like jQuery Ken Link to comment https://forums.phpfreaks.com/topic/204959-radio-button-that-populates-text-fields/#findComment-1073024 Share on other sites More sharing options...
damaya Posted June 16, 2010 Author Share Posted June 16, 2010 So, I would have jQuery start the PHP script that does the DNS lookup when the YES button is checked, and jQuery populate the fields after the lookup returns results? I'd love to be pointed in the direction of a good tutorial or a decent start, because I am an epic failure at Google when it comes to trying to figure this one out. Link to comment https://forums.phpfreaks.com/topic/204959-radio-button-that-populates-text-fields/#findComment-1073034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.