Adroon
07-17-2012, 08:38 PM
Hello,
While building a simple website for the company (http://midas.bg/new) I've encountered the following issue.
Since the content is very small, there aren't any pages. Basic links Home/Services/Contacts activate hidden DIVs using the following code:
function showonlyone(thechosenone) {
var newboxes = document.getElementsByTagName("div");
for(var x=0; x<newboxes.length; x++) {
name = newboxes[x].getAttribute("class");
if (name == 'newboxes') {
if (newboxes[x].id == thechosenone) {
newboxes[x].style.display = 'block';
}
else {
newboxes[x].style.display = 'none';
}
}
}
}
Problem is that on the Contacts page (the last one) there's an IFRAME for Google Maps showing the location of the office. If the DIV is not hidden,
the map shows the mark. If the DIV is hidden and triggered by the script, it only shows the map without the mark.
Do you guys have any suggestions?
Secondly, I would like to ask if you know of any simple code for triggering smooth transition when clicking on Home/Services/Contacts,
like fading, instead of immediately showing DIV's content.
Thanks for looking into this!
While building a simple website for the company (http://midas.bg/new) I've encountered the following issue.
Since the content is very small, there aren't any pages. Basic links Home/Services/Contacts activate hidden DIVs using the following code:
function showonlyone(thechosenone) {
var newboxes = document.getElementsByTagName("div");
for(var x=0; x<newboxes.length; x++) {
name = newboxes[x].getAttribute("class");
if (name == 'newboxes') {
if (newboxes[x].id == thechosenone) {
newboxes[x].style.display = 'block';
}
else {
newboxes[x].style.display = 'none';
}
}
}
}
Problem is that on the Contacts page (the last one) there's an IFRAME for Google Maps showing the location of the office. If the DIV is not hidden,
the map shows the mark. If the DIV is hidden and triggered by the script, it only shows the map without the mark.
Do you guys have any suggestions?
Secondly, I would like to ask if you know of any simple code for triggering smooth transition when clicking on Home/Services/Contacts,
like fading, instead of immediately showing DIV's content.
Thanks for looking into this!