2013-05-13 47 views
1

我遇到了錨定目標標記的問題。錨定規範是:錨定目標不起作用

<?php echo anchor(site_url('areaResponsable/perfil'), "Aquí", array('target' => '_self')); ?> 

但是,當我將項目上載到服務器時,鏈接將在新選項卡中打開。和FireBug顯示下一個主播:

<a class="external_link" target="_blank" 
href="http://apps.manantiales.edu.ar/index.php/areaResponsable/perfil">Aquí</a> 

什麼錯,任何想法?

+2

莫不是到位一些JavaScript動態地將'目標=「_空白」'與'類鏈接.external_link'?當你刪除該類時會發生什麼? – Mudshark 2013-05-13 12:02:02

+0

試試這個回聲錨(site_url('areaResponsable/perfil'),「Aquí」,'target =「_ self」'); ?> – umefarooq 2013-05-13 12:27:46

+0

@Mudshark,好主意,我會檢查一下。 – ramiromd 2013-05-13 12:32:49

回答

0

我檢查了你的網站http://apps.manantiales.edu.ar/index.php併爲你所有的js文件做了一個wget。我發現一個名爲gebo_common.js的庫將其中的'http'鏈接設置爲外部鏈接。哪個使用site_url將使用http。

服務器上的文件http://apps.manantiales.edu.ar/js/gebo_common.js有jQuery代碼來將類'external_link'設置爲絕對地址。

所以做到這一點:

echo anchor('areaResponsable/perfil', "Aquí")