Asgard
11-25-2012, 04:28 PM
Hello everyone !
I am new to these boards so I am sorry if this is posted in wrong section or I do something wrong. Well anyhow this is the issue:
I have uploaded files to my free testing website gustavs.webatu.com - it is going to be a tattoo website. I am not an expirienced coder - just used to making html webpages with tables and few occassional javasripts. Now I have moved away from iframes and moved onto "divs". On most part I can make it work well enough, but I have stumbled upon an issue I can't seem to find a solution to.
Please check my above mentioned website - there is a link "Gallery". The idea is simple - when person clicks on any main menu link (for now only gallery is active), in div with id "contentarea" opens the necessary page, in this case gallery page. I am using galleria as it is simple and is quite enough for my needs. You can see that when you click on the link, the action indeed works fine and gallery opens as it should (sorry for long load times - I have unresized images for now). The problem starts when you click the gallery for the second time. It doesn't matter if you just click on gallery 2 times or browse away to other section and then go back to gallery - the script doesn't load. Do you have any idea what could be the reason of that.
I am using this very old DD script: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
What can you suggest to me ? Is there something I have done wrong or should I use some other type of script for this ?
This is how my main html looks like:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="author" content="Gustavs Pelecis, SIA LinaGallery">
<meta name="keywords" content="Tattoo, Tetovējumi, Tetovēšana, Tetovēšana Liepāja, Tattoo Emporium, Lina Freimane Tattoo, Līnas Freimanes tetovēšanas studija, Lina Freimane Tattoo Emporium, Tattoo Liepaja, Tetovējumi Liepāja">
<title>Lina Freimane Tattoo Emporium</title>
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/960.css" />
<link rel="stylesheet" href="css/demo.css" />
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
</head>
<body>
<div class="container_12">
<img src="img/index_02.gif" width="960" border="0">
<div class="grid_8" id="contentarea">
<p></p></div>
<!-- end .grid_8 -->
<div class="grid_4">
<img src="img/index_04.gif">
<p><a href="javascript:ajaxpage('test.html', 'contentarea');"><img src="img/index_08.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('test.html', 'contentarea');"><img src="img/index_10.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('11.html', 'contentarea');"><img src="img/index_12.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('gallery.html','contentarea'); loadobjs('galleria/galleria-1.2.8.min.js','galleria.js')"><img src="img/index_14.gif"></a></p>
</div>
<!-- end .grid_4 -->
<div class="clear"></div>
<div class="grid_12">
<p></p>
</div>
<!-- end .grid_12 -->
<div class="clear"></div>
<div class="grid_4">
<img src="img/index_17.gif">
</div>
<!-- end .grid_4 -->
<div class="grid_8">
<p></p>
</div>
<!-- end .grid_8 -->
</div>
<!-- end .container_12 -->
</body>
</html>
* ajax.js is the script from DD Ajax script - I just moved it to external file in order to have cleaner file.
This is the gallery page:
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
</head>
<body>
<div id="galleria">
<img src="galleria/images/1.JPG">
<img src="galleria/images/2.JPG">
</div>
</body>
</html>
Can you please suggest me anything to solve this :) ?
Gustavs
I am new to these boards so I am sorry if this is posted in wrong section or I do something wrong. Well anyhow this is the issue:
I have uploaded files to my free testing website gustavs.webatu.com - it is going to be a tattoo website. I am not an expirienced coder - just used to making html webpages with tables and few occassional javasripts. Now I have moved away from iframes and moved onto "divs". On most part I can make it work well enough, but I have stumbled upon an issue I can't seem to find a solution to.
Please check my above mentioned website - there is a link "Gallery". The idea is simple - when person clicks on any main menu link (for now only gallery is active), in div with id "contentarea" opens the necessary page, in this case gallery page. I am using galleria as it is simple and is quite enough for my needs. You can see that when you click on the link, the action indeed works fine and gallery opens as it should (sorry for long load times - I have unresized images for now). The problem starts when you click the gallery for the second time. It doesn't matter if you just click on gallery 2 times or browse away to other section and then go back to gallery - the script doesn't load. Do you have any idea what could be the reason of that.
I am using this very old DD script: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
What can you suggest to me ? Is there something I have done wrong or should I use some other type of script for this ?
This is how my main html looks like:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="author" content="Gustavs Pelecis, SIA LinaGallery">
<meta name="keywords" content="Tattoo, Tetovējumi, Tetovēšana, Tetovēšana Liepāja, Tattoo Emporium, Lina Freimane Tattoo, Līnas Freimanes tetovēšanas studija, Lina Freimane Tattoo Emporium, Tattoo Liepaja, Tetovējumi Liepāja">
<title>Lina Freimane Tattoo Emporium</title>
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/960.css" />
<link rel="stylesheet" href="css/demo.css" />
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
</head>
<body>
<div class="container_12">
<img src="img/index_02.gif" width="960" border="0">
<div class="grid_8" id="contentarea">
<p></p></div>
<!-- end .grid_8 -->
<div class="grid_4">
<img src="img/index_04.gif">
<p><a href="javascript:ajaxpage('test.html', 'contentarea');"><img src="img/index_08.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('test.html', 'contentarea');"><img src="img/index_10.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('11.html', 'contentarea');"><img src="img/index_12.gif"></a>
<img src="img/spacer.gif" width="220" height="10">
<a href="javascript:ajaxpage('gallery.html','contentarea'); loadobjs('galleria/galleria-1.2.8.min.js','galleria.js')"><img src="img/index_14.gif"></a></p>
</div>
<!-- end .grid_4 -->
<div class="clear"></div>
<div class="grid_12">
<p></p>
</div>
<!-- end .grid_12 -->
<div class="clear"></div>
<div class="grid_4">
<img src="img/index_17.gif">
</div>
<!-- end .grid_4 -->
<div class="grid_8">
<p></p>
</div>
<!-- end .grid_8 -->
</div>
<!-- end .container_12 -->
</body>
</html>
* ajax.js is the script from DD Ajax script - I just moved it to external file in order to have cleaner file.
This is the gallery page:
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
</head>
<body>
<div id="galleria">
<img src="galleria/images/1.JPG">
<img src="galleria/images/2.JPG">
</div>
</body>
</html>
Can you please suggest me anything to solve this :) ?
Gustavs