This topic is locked
[SOLVED]

 iframe on list page / iframe src= dependent on latitude and longitude fields in table_list page records

6/8/2016 5:59:43 PM
PHPRunner General questions
Y
YCH author

I have a list page with multpile records and each record having a keyid and latitude and longitude field and some place for a i-frame.

I would like to get the values of the latitude and longitude fields from the list page for each respective record in order to build for each record a specific iframe src name of type src="http://www.somedomain.com/map="; & latitude [size="2"]& ", " & longitude (not being a common map from google, bing, or other .)[/size]
At some stage my _listpage will probably have this code for the iframe
echo '<IFRAME SRC="http://www.somedomain.com/map=";'.latitudefiledvalue.", ".longitudefieldvalue.'" WIDTH="400" HEIGHT="300"></IFRAME>';
How can I get hold of the latitude and longitude field values for each record and insert the iframe for each specific record in my list page?

Sergey Kornilov admin 6/8/2016

I guess you are looking to use 'View as' Custom type for one of fields. In your code you can build HTML code for this iframe:

$value = '<IFRAME SRC="http://www.somedomain.com/map="'.$data["latitudefiledvalue"].";, ".$data["longitudefieldvalue"].'" WIDTH="400" HEIGHT="300"></IFRAME>';
Y
YCH author 6/8/2016



I guess you are looking to use 'View as' Custom type for one of fields. In your code you can build HTML code for this iframe:

$value = '<IFRAME SRC="http://www.somedomain.com/map="'.$data["latitudefiledvalue"].";, ".$data["longitudefieldvalue"].'" WIDTH="400" HEIGHT="300"></IFRAME>';



That is exactly what I was looking for.

Many thanks Sergey.