false Posted December 7, 2009 Report Share Posted December 7, 2009 (edited) index.php fails <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>title</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="/js.js"></script> </head> <body> <div class="rand"> <a href="javascript:;" onclick="load_someone_said(); return false;"><img src="efresh.gif" style="border: 0pt none ;"></a> <?php include("rand.php"); ?></div> </head> </html> rand.php <?php rand(4,412); ?> js.js fails function load_monitor() { $("#rand").html('<img style="background-position: center;" src="http://heal.lv/style/web_images/spinner.gif">'); $("#rand").load("rand.php"); } Problēma ir tāda kā viņš negrib neko refrešot? Edited December 7, 2009 by false Quote Link to comment Share on other sites More sharing options...
marcis Posted December 7, 2009 Report Share Posted December 7, 2009 Neredzu neko šādu: <div id="rand"></div> Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted December 7, 2009 Report Share Posted December 7, 2009 Un tāpat šī load_monitor() funkcija pati no sevis neizsauksies. Quote Link to comment Share on other sites More sharing options...
sandis_m Posted December 7, 2009 Report Share Posted December 7, 2009 Un tāpat šī load_monitor() funkcija pati no sevis neizsauksies. Kaads divains scripts.... Quote Link to comment Share on other sites More sharing options...
2easy Posted December 7, 2009 Report Share Posted December 7, 2009 1) ja tu nodefinē funkciju load_monitor(), tad arī izsauc to, nevis load_someone_said() 2) ja tu gribi kko saņemt no rand.php, tad tur ir jābūt echo rand(4,412); nevis vnk rand(4,412); 3) ja tu gribi kko ierakstīt iekš taga ar id "rand", tad tam vajag atribūtu id="rand", nevis class="rand" 4) un ņemot vērā visu iepriekšējo, ļoti iespējams, ka jquery bibliotēka arī nemaz nav inkludota. publiskā piemērā varēji ielikt kaut vai <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> izlabojot to, tā jau savādāk viss strādā nekas, kad paaugsies, tad jau arī kļūdas paliks "gudrākas" ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.