Fóruns sobre PHP, JavaScript, HTML, MySQLi, jQuery, Banco de Dados, CSS


Moderador: web

 
Primeiras postagens
Primeiras postagens
Tópico Autor
Mensagens: 3

Problema para executar js

29-03-2010 16:16

Ola,
estou usando Ajax para abrir em uma div algumas paginas, mais dentro dessas paginas não funciona nada do js, é como se não tivese nenhum script dentro, mais tem, gostaria de saber como solucionar o problema..

ajax.js
function GetXMLHttp() { if(navigator.appName == "Micosoft Internet Explorer") { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlHttp = new XMLHttpRequest(); } return xmlHttp; } var xmlRequest = GetXMLHttp();

instrucao.js
function abrirPag(valor){ var url = valor; xmlRequest.onreadystatechange = mudancaEstado; xmlRequest.open("GET",url,true); xmlRequest.send(null); if (xmlRequest.readyState == 1) { document.getElementById("conteudo").innerHTML = "<img src='../images/loader.gif'>"; } return url; } function mudancaEstado(){ if (xmlRequest.readyState == 4){ document.getElementById("conteudo").innerHTML = xmlRequest.responseText; // coloca o valor no objeto requisitado texto=unescape(xmlhttp.responseText.replace(/\+/g," ")); document.getElementById("conteudo").innerHTML=texto; // executa scripts extraiScript(texto); } }

pagina q abre na div

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- Colour Schemes Default colour scheme is green. Uncomment prefered stylesheet to use it. <link rel="stylesheet" href="resources/css/blue.css" type="text/css" media="screen" /> <link rel="stylesheet" href="resources/css/red.css" type="text/css" media="screen" /> --> <!-- Internet Explorer Fixes Stylesheet --> <!--[if lte IE 7]> <link rel="stylesheet" href="resources/css/ie.css" type="text/css" media="screen" /> <![endif]--> <!-- Javascripts --> <!-- Ajax--> <script type="text/javascript" src="../../resources/scripts/ajax.js"></script> <script type="text/javascript" src="../../resources/scripts/instrucao.js"></script> <!-- jQuery --> <script type="text/javascript" src="../../resources/scripts/jquery-1.3.2.min.js"></script> <!-- jQuery Configuration --> <script type="text/javascript" src="../../resources/scripts/simpla.jquery.configuration.js"></script> <!-- Facebox jQuery Plugin --> <script type="text/javascript" src="../../resources/scripts/facebox.js"></script> <!-- jQuery WYSIWYG Plugin --> <script type="text/javascript" src="../../resources/scripts/jquery.wysiwyg.js"></script> <!-- jQuery Datepicker Plugin --> <script type="text/javascript" src="../../resources/scripts/jquery.datePicker.js"></script> <script type="text/javascript" src="../../resources/scripts/jquery.date.js"></script> <!--[if IE]><script type="text/javascript" src="resources/scripts/jquery.bgiframe.js"></script><![endif]--> <!-- Internet Explorer .png-fix --> <!--[if IE 6]> <script type="text/javascript" src="resources/scripts/DD_belatedPNG_0.0.7a.js"></script> <script type="text/javascript"> DD_belatedPNG.fix('.png_bg, img, li'); </script> <![endif]--> </head> <body><div id="body-wrapper"> <!-- Wrapper for the radial gradient background --> <div class="clear"></div> <!-- End .clear --> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Content box</h3> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">Table</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2">Forms</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <div class="notification attention png_bg"> <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> This is a Content Box. You can put whatever you want in it. By the way, you can close this notification with the top-right cross. </div> </div> <table> <thead> <tr> <th><input class="check-all" type="checkbox" /></th> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> <th>Column 5</th> </tr> </thead> <tfoot> <tr> <td colspan="6"> <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> <div class="pagination"> <a href="#" title="First Page">&laquo; First</a><a href="#" title="Previous Page">&laquo; Previous</a> <a href="#" class="number" title="1">1</a> <a href="#" class="number" title="2">2</a> <a href="#" class="number current" title="3">3</a> <a href="#" class="number" title="4">4</a> <a href="#" title="Next Page">Next &raquo;</a><a href="#" title="Last Page">Last &raquo;</a> </div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> <tbody> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> <tr> <td><input type="checkbox" /></td> <td>Lorem ipsum dolor</td> <td><a href="#" title="title">Sit amet</a></td> <td>Consectetur adipiscing</td> <td>Donec tortor diam</td> <td> <!-- Icons --> <a href="#" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a> <a href="#" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> </td> </tr> </tbody> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="#" method="post"> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <label>Small form input</label> <input class="text-input small-input" type="text" id="small-input" name="small-input" /> <span class="input-notification success png_bg">Successful message</span> <!-- Classes for input-notification: success, error, information, attention --> <br /><small>A small description of the field</small> </p> <p> <label>Medium form input</label> <input class="text-input medium-input datepicker" type="text" id="medium-input" name="medium-input" /> <span class="input-notification error png_bg">Error message</span> </p> <p> <label>Large form input</label> <input class="text-input large-input" type="text" id="large-input" name="large-input" /> </p> <p> <label>Checkboxes</label> <input type="checkbox" name="checkbox1" /> This is a checkbox <input type="checkbox" name="checkbox2" /> And this is another checkbox </p> <p> <label>Radio buttons</label> <input type="radio" name="radio1" /> This is a radio button<br /> <input type="radio" name="radio2" /> This is another radio button </p> <p> <label>This is a drop down list</label> <select name="dropdown" class="small-input"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> <option value="option4">Option 4</option> </select> </p> <p> <label>Textarea with WYSIWYG</label> <textarea class="text-input textarea wysiwyg" id="textarea" name="textfield" cols="79" rows="15"></textarea> </p> <p> <input class="button" type="submit" value="Submit" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="content-box column-left"> <div class="content-box-header"> <h3>Content box left</h3> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab"> <h4>Maecenas dignissim</h4> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in porta lectus. Maecenas dignissim enim quis ipsum mattis aliquet. Maecenas id velit et elit gravida bibendum. Duis nec rutrum lorem. Donec egestas metus a risus euismod ultricies. Maecenas lacinia orci at neque commodo commodo. </p> </div> <!-- End #tab3 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="content-box column-right closed-box"> <div class="content-box-header"> <!-- Add the class "closed" to the Content box header to have it closed by default --> <h3>Content box right</h3> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab"> <h4>This box is closed by default</h4> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in porta lectus. Maecenas dignissim enim quis ipsum mattis aliquet. Maecenas id velit et elit gravida bibendum. Duis nec rutrum lorem. Donec egestas metus a risus euismod ultricies. Maecenas lacinia orci at neque commodo commodo. </p> </div> <!-- End #tab3 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> <!-- Start Notifications --> <div class="notification attention png_bg"> <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> Attention notification. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vulputate, sapien quis fermentum luctus, libero. </div> </div> <div class="notification information png_bg"> <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> Information notification. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vulputate, sapien quis fermentum luctus, libero. </div> </div> <div class="notification success png_bg"> <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> Success notification. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vulputate, sapien quis fermentum luctus, libero. </div> </div> <div class="notification error png_bg"> <a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> Error notification. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vulputate, sapien quis fermentum luctus, libero. </div> </div> <!-- End Notifications --> </div> <!-- End #main-content --> </div></body> <!-- Download From www.exet.tk--> </html>

0
 
Avatar do usuário
ADMIN
ADMIN
Mensagens: 17666
Nome: Kleber
Descrição do site: Onde você encontra scripts grátis para o seu site
Sexo: Masculino
Localização: RJ / RJ / Brasil
Contato:

Problema para executar js

29-03-2010 17:25

Realmente isso acontece com Ajax. O correto é não carregar scripts JS via Ajax. Em alguns caso é viável carregar um outro documento, e nesse documento carregar um iframe, que abre esse documento.
0
A melhor hospedagem para o seu site HostGator!
 
Primeiras postagens
Primeiras postagens
Tópico Autor
Mensagens: 3

Problema para executar js

30-03-2010 10:55

mais tem como resolver esse problema? vi um cara comentando em um lugar q dava pra arrumar com json mais não mostrava como
0
 
Avatar do usuário
ADMIN
ADMIN
Mensagens: 17666
Nome: Kleber
Descrição do site: Onde você encontra scripts grátis para o seu site
Sexo: Masculino
Localização: RJ / RJ / Brasil
Contato:

Problema para executar js

30-03-2010 12:16

Não conheço jSon, mas nesse link acho que tem umas base sobre isso

http://wiki.developers.facebook.com/ind ... mples/Ajax
0
A melhor hospedagem para o seu site HostGator!

Quem está online

Usuários navegando neste fórum: Bing [Bot]