【问题标题】:Insert Geocoding In Joomla Component Backend 2.5在 Joomla 组件后端 2.5 中插入地理编码
【发布时间】:2012-11-10 23:44:26
【问题描述】:

我目前正在为 Joomla 2.5 开发我的第一个组件,我在后端插入了 jForm,我现在需要在后端添加 java 脚本,因为我需要对插入的地址进行地理编码,然后填写两个一个是纬度,另一个是经度。

每次我尝试在后端插入任何形式的脚本时都会收到 500 错误。

任何帮助将不胜感激。

【问题讨论】:

  • 你能提供你用来插入javascript的代码吗?

标签: javascript jquery joomla joomla2.5 joomla-extensions


【解决方案1】:

就这么简单:

$document = JFactory::getDocument();
$document->addScript("http://maps.google.com/maps/api/js?sensor=false");
$document->addScript("//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js");
$document->addScript(JURI::base() . 'media/mod_locate/js/mod_map.js');
$document->addStyleSheet(JURI::base() . 'media/mod_locate/css/mod_map.css');

还是谢谢:)

【讨论】:

    猜你喜欢
    • 2012-10-31
    • 2013-09-11
    • 2012-06-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-10
    • 1970-01-01
    • 2012-05-08
    相关资源
    最近更新 更多