...

View Full Version : Loading content on a specific div. Help for noob



ricroma
07-25-2011, 04:39 PM
Hi,

I'm new on the site, an a complete amateur in web developing. Nevertheless, I've decided to engage this huge challenge (according to my forces) to create the website of my small business.
Now, I have this problem (for now).

This (http://www.koti.it/new_site/marchi.php) and this (http://www.koti.it/new_site/servizi.php) are the pages I'm talking about. They have a left column with different options, and then when you click on them the relative content appears on right column. After a long search I used this tutorial (http://yensdesign.com/2008/12/how-to-load-content-via-ajax-in-jquery/).
Right now not all the elements show a content, I'm just trying if it works and it does. Still, I need to add some other features that I'm not able to implement:

a) when I click on a item on the left column, this one should remain somehow highlighted (different background, different color, or whatever).

b) I need a way to point to specific content from other pages: like "visit our workshop" on page A => goes to "workshop" section on page B (http://www.koti.it/new_site/servizi.php).

So, my questions is: is there another method or script that does what I need (also without the fancy sliding effect) and does it without getting into too much hardcore coding? The only thing I would like to keep from my project is the fact that the page does not completely load again.

Thanks a lot. Sorry I'm not good at explain technical stuff...

Ricroma

Sammy12
07-25-2011, 07:47 PM
your using :active, which is only seen when the img is clicked
http://www.w3schools.com/css/css_pseudo_classes.asp

you will need to use javascript to change the style of the image http://twelvestone.com/forum_thread/view/31411

---

You could use php modes, but I think your looking for something that stays on the page, so your in the right direction. i only glanced at the tutorial, but I figure its some type of onclick display: none --> display: block; with some ajax to make it purty.

---

Your looking at a link that gears to a specific section of a page?


<a href="#hockey">go to hockey section below</a>
<div id="hockey"></a>


They are called intra-links, I use the method above, though I rarely use it at all.

If you want to access an intra-link from a different page:


<a href="sports.html#hockey></a>


I think...once again I don't use intra-links that often



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum