[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
www.dhtmlgoodies.com • View topic - Dynamic Loaded Articles - configuration not working
Advertisement

Dynamic Loaded Articles - configuration not working

Moderators: Calcifer, slothy

Dynamic Loaded Articles - configuration not working

Postby Mehmet » Tue Jul 18, 2006 10:44 pm

http://www.dhtmlgoodies.com/index.html? ... icArticles

When I click on an article, I get "Finding article.....
Please wait
" message on the left window and it does not load the article.

I copied and pasted the script in the above URL, downloaded articles, and ajax.js file, followed the directions about changing the location in src="js/ajax.js".

SO everything is in place... still not working. what is wrong? Please help!
Mehmet
 
Posts: 7
Joined: Tue Jul 18, 2006 10:27 pm

Postby Batalf » Tue Jul 18, 2006 10:47 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Mehmet » Wed Jul 19, 2006 2:37 pm

Mehmet
 
Posts: 7
Joined: Tue Jul 18, 2006 10:27 pm

Postby Batalf » Wed Jul 19, 2006 7:44 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Mehmet » Wed Jul 19, 2006 10:24 pm

Our dev server is closed to outside access, but I will copy-paste the code:

So I have all article files, ajax.js, and ann index.html file in the same directory.

index.html:

In the way the code in the BODY section is, the article list actually apprears within the

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
<style type="text/css">
body{
background-repeat:no-repeat;
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
font-size:0.9em;
line-height:130%;
text-align:center;
height:100%;
background-color: #E2EBED;
}
#contentContainer h2{ /* No margins above <h2> tags */
margin-top:0px;
}


#mainContainer{
width:755px;
margin:0 auto;
text-align:left;
padding:5px;
margin-top:20px;
border:1px solid #000;
background-color: #FFF;
}
#contentContainer{
float:left;
border:1px solid #000;
background-color: #E2EBED;
overflow:auto;
margin-right:10px;
padding:10px;

/* CSS HACK */
width: 497px; /* IE 5.x */
width/* */:/**/480px; /* Other browsers */
width: /**/480px;

/* CSS HACK */
height: 412px; /* IE 5.x */
height/* */:/**/390px; /* Other browsers */
height: /**/390px;

}


#contentContainer .openingText{
color:red;
}

#articleListContainer{ /* <ul> container for article list */
float:left;
height:410px;
overflow:auto;
width:240px;
border:1px solid #000;
background-color:#FFF;
}
.articleList{
margin:0px;
padding:2px;
}
.articleList li{ /* General layout article in list */
list-style-type:none;
border:1px solid #999;
background-color:#EEE;
height:50px;
margin:1px;
padding:2px;
color:#333;
cursor:pointer;
}
.articleList li.articleMouseOver{ /* Mouse over article in list - layout */
border:1px solid #000;
color:#000;
}
.articleList li.articleClick{ /* Active article in list - layout */
border:1px solid #000;
color:#000;
background-color:#317082;
color:#FFF;
}

.keyText{ /* Just a column I use for key text inside articles - the one with the light blue bg and dotted border */
background-color:#FFF;
border:1px dotted #000;
float:right;
margin-top:5px;
margin-left:5px;
margin-bottom:5px;
width:150px;
padding:3px
}
.clear{
clear:both;
}
</style>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript">
/************************************************************************************************************
(C) www.dhtmlgoodies.com, October 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

www.dhtmlgoodies.com
Alf Magne Kalleland

************************************************************************************************************/
var ajax = new sack();
var articleListObj;
var activeArticle = false;
var clickedArticle = false;
var contentObj // Reference to article content <div>

function mouseoverArticle() // Highlight article
{
if(this==clickedArticle)return;
if(activeArticle && activeArticle!=this){
if(activeArticle==clickedArticle)
activeArticle.className='articleClick';
else
activeArticle.className='';

}
this.className='articleMouseOver';
activeArticle = this; // Storing reference to this article
}

function showContent() // Displaying content in the content <div>
{
contentObj.innerHTML = ajax.response; // ajax.response is a variable that contains the content of the external file
}

function showWaitMessage()
{
contentObj.innerHTML = 'Finding article.....<br>Please wait';
}
function getAjaxFile(fileName)
{
ajax.requestFile = fileName; // Specifying which file to get
ajax.onCompletion = showContent; // Specify function that will be executed after file has been found
ajax.onLoading = showWaitMessage; // Action when AJAX is loading the file
ajax.runAJAX(); // Execute AJAX function
}

function selectArticle() // User have clicked on an article
{
getAjaxFile(this.id + '.html'); // Calling the getAjasFile function. argument to the function is id of this <li> + '.html', example "article1.html"
if(clickedArticle && clickedArticle!=this)clickedArticle.className='articleMouseOver';
this.className='articleClick';
clickedArticle = this;
}


function initAjaxDemo()
{
articleListObj = document.getElementById('articleList');
var articles = articleListObj.getElementsByTagName('LI');
for(var no=0;no<articles.length;no++){
articles[no].onmouseover = mouseoverArticle;
articles[no].onclick = selectArticle;
}

contentObj = document.getElementById('contentContainer');
}
window.onload = initAjaxDemo;
</script>

</head>




<body>
<div id="mainContainer">
<div id="contentContainer">
<h2 class="openingText">Click on one of the articles to the right.</h2>
<p>This will load the the content of external articles into this </p>
</div>
<div id="articleListContainer">
<ul id="articleList" class="articleList">
<li id="article1">This is article number one</li>
<li id="article2">This is the second article</li>
<li id="article3">Article number 3</li>
<li id="article4">About AJAX</li>
<li id="article5">Article number 5</li>
<li id="article6">Article number 6</li>
<li id="article7">Article number 7</li>
<li id="article8">Article number 8</li>
<li id="article9">Article number 9</li>
</ul>
</div>
<div class="clear"></div>
</div>



</body>
</html>
Mehmet
 
Posts: 7
Joined: Tue Jul 18, 2006 10:27 pm

Postby Batalf » Wed Jul 19, 2006 10:29 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Mehmet » Thu Jul 20, 2006 2:33 pm

Mehmet
 
Posts: 7
Joined: Tue Jul 18, 2006 10:27 pm

Error check

Postby muskokee » Thu Oct 26, 2006 6:52 pm

muskokee
 
Posts: 2
Joined: Thu Oct 26, 2006 6:49 pm

Dynamic Loaded Articles - configuration not working

Postby dedpihto » Thu Nov 09, 2006 7:34 pm

Sorry, it worked on the server.

Thank you, it's really helpfull set up.
dedpihto
 
Posts: 1
Joined: Thu Nov 09, 2006 6:49 pm


Return to Questions regarding other scripts at www.dhtmlgoodies.com

Who is online

Users browsing this forum: No registered users and 4 guests

cron