Guest
05 May 2013 11:25

Hi,

I have a type where I use geo fields and html fields.

I am using the cobalt geo field which stores the address and post code. Is it posible to take the value of address + post code value and use that value inside HTML field in its default parameter? The reason is to use a javascript in html field where the post code and address are used.

Kind Regards

Brian

Last Modified: 02 Mar 2014


pepperstreet VIP
Total posts: 3,837
05 May 2013 22:00

Not sure if i got the idea... but why the extra HTML field and its default value area? Where and when do you need the modification through the script? What does it?

Do you already use a custom article/list template? Maybe better and easier to add custom scripts and modifications there!?


Guest
06 May 2013 02:27

Not sure if i got the idea... but why the extra HTML field and its default value area? Where and when do you need the modification through the script? What does it?

Sorry for the Confusion. Let me explain the background behind it and what I am trying to achieve. I am trying to place neighbourhood maps inside the full view template.

I have tried to get it done, but am stuck at one point. Let me explain what I did. I tried to use walkscore java script as done in the following url:

http://osproperty.ext4joomla.com/index.php/property/for-lease/Rodeway-Inn-Convention-Center.html

what I did is I created an HTML Field and inside there, I placed walkscore generated javascript. But the problem with this is the location/address field which is static. I just placed manually the address field (var ws_address = 'sm25he';)as below:

<script type='text/javascript'>

var ws_wsid = 'ffcb796ccfff8e170e9c17fb1d906094';

var ws_address = 'sm25he';

var ws_width = '700';

var ws_height = '540';

var ws_layout = 'horizontal';

var ws_hide_footer = 'true';

var ws_commute = 'true';

var ws_transit_score = 'true';

var ws_show_reviews = 'true';

var ws_map_modules = 'default';

var ws_no_link_info_bubbles = 'true';

var ws_no_link_score_description = 'true';

</script><style type='text/css'>#ws-walkscore-tile{position:relative;text-align:left}#ws-walkscore-tile *{float:none;}#ws-

footer a,#ws-footer a:link{font:11px/14px Verdana,Arial,Helvetica,sans-serif;margin-right:6px;white-

space:nowrap;padding:0;color:#000;font-weight:bold;text-decoration:none}#ws-footer a:hover{color:#777;text-

decoration:none}#ws-footer a:active{color:#b14900}</style><div id='ws-walkscore-tile'></div><script type='text/javascript' 

src=' http://www.walkscore.com/tile/show-walkscore-tile.php '></script>

I have also another user input geo field in the same section/Type. The issue is I dont know how to get the address value from the geo field and place it inside the javascript. There may be a way to do thia. Once thiis is done, you can directly see the actual walkscore implemented inside template which changes as per user input, which is dynamic.

Any idea how to do?

Not sure if i got the idea... but why the extra HTML field and its default value area? Where and when do you need the modification through the script? What does it?

Do you already use a custom article/list template? Maybe better and easier to add custom scripts and modifications there!?

I don't use any custom, but don't know how to do there. I am not an php/JS expert.

Kind Regards

Brian


Sergey
Total posts: 13,748
06 May 2013 06:58

I swear I typed answer for something like this!


Guest
07 May 2013 05:24

Does GoogleMap have a similar variable exchange? Maybe it can work as a code hint and advice.

Good question, would love to see that. I also think we should use the ajax enabled google custom search textbox in our keyword search in cobalt filter module.

Powered by Cobalt