Problem z którym nie mogę sobie poradzić od 6 h. Wygląda to tak:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="./css/style.css" /> <link rel="stylesheet" type="text/css" href="./css/rating.css" /> <script type="text/javascript"> function ahah(url, target) { document.getElementById(target).innerHTML = ' Ładuje dane...'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } if (req != undefined) { req.onreadystatechange = function() {ahahDone(url, target);}; req.open("GET", url, true); req.send(""); } } function ahahDone(url, target) { if (req.readyState == 4) { if (req.status == 200) { document.getElementById(target).innerHTML = req.responseText; } else { document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText; } } } function load(name, div) { ahah(name,div); return false; } $(document).ready(function() { load('./html_forms/ankieta.php','frame_form'); $('#rate1').rating('www.url.php', {maxvalue:5}); }); </script> </head> <body> <div> <form> </form> </div> </body> </html>
Jak widać z powyższego kodu ładuję plik ankieta.php do div'a frame_form
Plik ankieta zawiera:
W divie <div id="rate1" class="rating"></div> ładowany jest plugin star-rank.
Div ten jest osadzony w index.php i w ankieta.php. W index.php działa a w ankieta.php nie.
Ma ktoś jakiś pomysł, sugestie?
Pozdrawiam.