My website has a javascript variable (addselectedsubdivision) that loads a neighborhood name from a box on the left to a box on the right. I was hoping I could build a link and then us PHP to add the subdivision letter, neighborhood, and city so that when you click on the link it goes right to this page and loads the neighborhood name in the box on the right. However, I can’t get the variable to pass to the new page. Any suggestions?
Example link:
<a href="http://www.mlsfinder.com/va_rein/jonmcachran/index.cfm?primarySearchType=sold&searchType=subdivision&so=a&domain=www.jonsellsvb.com&subdivision_string=$firstletter" onLoad="addselectedsubdivision($neighborhood||$city);" target="_blank">
What is the
onLoadattribute meant to do?In
index.cfmyou will need to have coldfusion code that will output a javascript statement based on the query parameters.So when the serverside sees that it has the arguuments
$neighborhoodand$citythen it will outputThis code will have to be contained in an
window.onload = function() {...}or equivalent block in order to only be executed after the page has loaded.