Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

added 821 characters in body
Source Link
Kai
  • 1.3k
  • 1
  • 9
  • 19

edit, BTW:

You don't need to use ajax to get the data? I'm not sure what you are trying...

<html>
 <head>
 <script type="text/javascript" charset="utf-8" src="http://web.itoday.gr/load.js"></script>
 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
 </head>
 <body>
 <script type="text/javascript">
 datebig(0);
 pics(0,1);
 dayofyear(0);
 weekofyear(0);
 datesmart(0);
 namesprefix(0);
 names(0);
 datesmart(1);
 namesprefix(1);
 names(1);
 history(0);
 global(0);
 </script>
 </body>
</html>

edit, BTW:

You don't need to use ajax to get the data? I'm not sure what you are trying...

<html>
 <head>
 <script type="text/javascript" charset="utf-8" src="http://web.itoday.gr/load.js"></script>
 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
 </head>
 <body>
 <script type="text/javascript">
 datebig(0);
 pics(0,1);
 dayofyear(0);
 weekofyear(0);
 datesmart(0);
 namesprefix(0);
 names(0);
 datesmart(1);
 namesprefix(1);
 names(1);
 history(0);
 global(0);
 </script>
 </body>
</html>
Source Link
Kai
  • 1.3k
  • 1
  • 9
  • 19

Is this the whole code? I've copy pasted your code and it works:

Your second page has a script tag. If you put it in the main script it will load it. Your current code TRIES to load it immediately, but of course fails. That's why you get errors like: function 'datebig(0)' not found.

Result: Παρασκευή, 25 Απριλίου 2014

<html>
 <head>
 <script type="text/javascript" charset="utf-8" src="http://web.itoday.gr/load.js"></script>
 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
 <script type="text/javascript">
 $(document).ready(function (){
 $("#page").click(function(){
 $("#ajax-content").empty();
 $("#ajax-content").load("page.html") 
 }); 
 });
 </script>
 </head>
 <body>
 <div id="ajax-content">
 <tr>
 <td style="width: 20%;">
 <p style="text-align: center;">
 <span style="line-height: 18px; text-align: left;">
 <a id="page" href="#" style="text-decoration: underline; color: rgb(241, 190, 4); ">
 <img width="102" height="102" alt="" src="images/1-2.png" style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;">
 </a>
 </span>
 </p>
 <h5 style="color: rgb(255, 255, 255);"><span style="line-height: 18px; text-align: left;">page</span></h5>
 </td>
 </tr>
 </div>
 </body>
</html>
default

AltStyle によって変換されたページ (->オリジナル) /