Ricardo FSA
12-03-2009, 06:35 PM
Hello. I'm not sure if this is the correct forum to post this, i'm sorry if it's not...
I'm building a webpage in .html, css, and a few javascript functions, no .php, etc.
I have used this (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm) principle to load a menu into my right div.
And in the left div i write the info regarding the current page.
So:
in News.html
Top Image
Left Div - have the news writen in text.
Right Div - have a javascript function to call menu.html
in Contacts.html
Top image
Left Div - have the contacts writen in text
Right Div - have a javascript function to call menu.html
etc, etc,....
I did this cause i wanted to have a unique address (in the adress bar) for each page we're reading. Everything is working!
But i have some questions.
1.
Is there a easier way to have unique adresses for each page we're seeing?
I ask this cause if i wanted to change the display (size, position etc) of the div's, i would have to do it in all the pages of my website. news.html, contacts.html, etc, correct?
I also have tried to load a xxx.html into the left div, using a javascript function.
Like:
in Index.html
Top Image
Left Div - a function to call the main page
Right Div - menu with functions to load each link into the left div
It worked ok, but the address was always www.mydomain.com/index.html
Is there an easy way to do this, without having to reformulate each page if i wanted to change the divs display, for example?
2.
I also wanted to have the menu link highligted when reading the page on the left div.
While having this format:
in Index.html
Top Image
Left Div - a function to call the main page
Right Div - menu with functions to load each link into the left div
i used this script (http://www.hicksdesign.co.uk/else/cssnav/)
But it didn't worked. Then i realised that the page in that script it's refreshing itself 100% when we click on each menu link. So maybe it's a different script for me.
Can anyone help me with this?
Thank you!!
I'm building a webpage in .html, css, and a few javascript functions, no .php, etc.
I have used this (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm) principle to load a menu into my right div.
And in the left div i write the info regarding the current page.
So:
in News.html
Top Image
Left Div - have the news writen in text.
Right Div - have a javascript function to call menu.html
in Contacts.html
Top image
Left Div - have the contacts writen in text
Right Div - have a javascript function to call menu.html
etc, etc,....
I did this cause i wanted to have a unique address (in the adress bar) for each page we're reading. Everything is working!
But i have some questions.
1.
Is there a easier way to have unique adresses for each page we're seeing?
I ask this cause if i wanted to change the display (size, position etc) of the div's, i would have to do it in all the pages of my website. news.html, contacts.html, etc, correct?
I also have tried to load a xxx.html into the left div, using a javascript function.
Like:
in Index.html
Top Image
Left Div - a function to call the main page
Right Div - menu with functions to load each link into the left div
It worked ok, but the address was always www.mydomain.com/index.html
Is there an easy way to do this, without having to reformulate each page if i wanted to change the divs display, for example?
2.
I also wanted to have the menu link highligted when reading the page on the left div.
While having this format:
in Index.html
Top Image
Left Div - a function to call the main page
Right Div - menu with functions to load each link into the left div
i used this script (http://www.hicksdesign.co.uk/else/cssnav/)
But it didn't worked. Then i realised that the page in that script it's refreshing itself 100% when we click on each menu link. So maybe it's a different script for me.
Can anyone help me with this?
Thank you!!