Jump to content

Displaying all the values of a drop-down menu's options


IanArcher

Recommended Posts

I am trying to display all the values of a drop-down menu's options. The drop down menu uses an onChange event that is as follows:

b1.input1.value=b1.select_business[this.selectedIndex].text

And when it's selected and the search button is clicked it displays the business info of a company on the page the user is directed to. How can i display the business info for all the selections in the drop down menu? What i've tried, but only displays the actual Name/Text of the business.

//$f = file_get_contents('http://****/business_directory_framed.asp'); //$p = file_put_contents('dir_detail_framed_asp.html', $f); $g = file_get_contents('dir_detail_framed_asp.html');$g = str_replace('action="business_detail_framed.asp"','action="http://****/business_detail_framed.asp"',$g);echo $g;#	'/<option[^>]+value="(.*)">(.*)/' //$r = preg_match_all('/<option[^>]+value="([^"]*)">([^"]*)/', $g, $matches) ? $matches[1] : '';$o = preg_match('/b1.input1.value=b1.select_business[this.selectedIndex].text/', $g, $matches) ? $matches[1] : '';print_r ($matches);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...