не могу сделать выборку в iframe
Есть такой вот HTML код
<div class="contentpane"> <iframe id="chatframe" name="iframe" src="http://localhost/joomla/111.ru/components/com_ajaxchat/chatapp.php?jid=2&view=chat" width="100%" height="500" scrolling="no" align="top" frameborder="0" class="ajaxchat"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" xmlns:xml="http://www.w3.org/XML/1998/namespace" lang="ru" dir="ltr"> <head> </head> <body> <div id="content"> <div id="chatList"> <div xmlns="http://www.w3.org/1999/xhtml" id="ajaxChat_m_51" class="rowOdd"> <a class="delete" title="Удалить сообщение" href="javascript:ajaxChat.deleteMessage(51);"> </a><span name="ajaxChat_m_51" onclick="ajaxChat.insertInsideLink(linkName=(this.outerText!=undefined)?this.outerText:this.textContent,this.getAttribute('name'));"> <span class="dateTime">(12:42:40)</span> <span class="admin" dir="ltr">Administrator</span> </span><a href="#"ajaxChat_m_5" class="insideLink"> (00:10:05) Вася </a>: аепрапрап</div> <div xmlns="http://www.w3.org/1999/xhtml" id="ajaxChat_m_68" class="rowEven"> <a class="delete" title="Удалить сообщение" href="javascript:ajaxChat.deleteMessage(68);"> </a><span name="ajaxChat_m_68" onclick="ajaxChat.insertInsideLink(linkName=(this.outerText!=undefined)?this.outerText:this.textContent,this.getAttribute('name'));"> <span class="dateTime">(12:43:46)</span> <span class="chatBot" dir="ltr">Вася</span></span> <a href="#ajaxChat_m_68" class="insideLink"> </a>: <span class="chatBotMessage">Вася входит в чат.</span></div> </div> </body> </html> NO_IFRAMES</iframe> </div>Теперь я пытаюсь найти ".insideLink" внутри тега iframe? и к примеру хочу получиться attr("href") этой ссылки, но это не получается и обработчик на ".insideLink" вообще не срабатывает, Пробовал писать и так {$(".insideLink").live('click',function(e){ не помогло. jQuery.noConflict(); jQuery(document).ready(function($) {$(".insideLink", $("iframe").contents()).live('click',function(e){ alert($(this).attr("href")); e.preventDefault(); e.stopPropagation(); return false; }); }); Подскажите как повесить обработчик на ссылку внутри iframe/:cray: |
спс мне удалось все таки включить в iframe и jQuery и код скирпта, а там уже проблем не было
|
Часовой пояс GMT +3, время: 06:01. |