Google Groups Home
Help | Sign in
Multiple sidebars?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
daniel  
View profile
(2 users)  More options Oct 5, 2:30 am
From: daniel <dajohnso...@gmail.com>
Date: Sat, 4 Oct 2008 23:30:30 -0700 (PDT)
Local: Sun, Oct 5 2008 2:30 am
Subject: Multiple sidebars?
I have a request from my boss to break up my current 1 sidebar into
many.

my map is very similar to http://www.osu.edu/map/google.php (as far as
the check boxes are concerned).  What he wants for whatever reason is
to have the sidebar text show under the checkbox based on the checkbox
being checked...

I saw this:
http://wolfpil.googlepages.com/toggle-cats.html

and it seems close, but I my knowledge of javascript isn't developed
enough to know what to tell the guy.

Any help would be much appreciated.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile
 More options Oct 5, 4:02 am
From: marcelo <marcelo...@hotmail.com>
Date: Sun, 5 Oct 2008 01:02:09 -0700 (PDT)
Local: Sun, Oct 5 2008 4:02 am
Subject: Re: Multiple sidebars?
Please follow the group's posting guidelines and post alink to *your*
page, not to other people's pages.
"Similar" is not good enough.

--
Marcelo - http://maps.forum.nu
--

On Oct 5, 8:30 am, daniel <dajohnso...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel  
View profile
(1 user)  More options Oct 5, 5:34 pm
From: daniel <dajohnso...@gmail.com>
Date: Sun, 5 Oct 2008 14:34:03 -0700 (PDT)
Local: Sun, Oct 5 2008 5:34 pm
Subject: Re: Multiple sidebars?
My apologies, I was unable to find "group's posting guidelines" so i
merely followed the suggested guidelines.  The server I have been
using when down for maintenance shortly before posting my  question,
hence the link to a similar map.

But thank you marcelo for renewing the faith I had in others to help
others.  I apologize for my inexperience.

here is the link: http://dajohnson1s.dvrdns.org/

On Oct 5, 3:02 am, marcelo <marcelo...@hotmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lan Mind  
View profile
 More options Oct 5, 5:43 pm
From: Lan Mind <LANMIN...@gmail.com>
Date: Sun, 5 Oct 2008 14:43:09 -0700 (PDT)
Local: Sun, Oct 5 2008 5:43 pm
Subject: Re: Multiple sidebars?
I was unable to see the page Daniel. Firefox says:

Firefox can't establish a connection to the server at
dajohnson1s.dvrdns.org.

On Oct 5, 2:34 pm, daniel <dajohnso...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Ames  
View profile
 More options Oct 5, 5:59 pm
From: Ralph Ames <ralph.a...@gmail.com>
Date: Mon, 6 Oct 2008 00:59:25 +0300
Local: Sun, Oct 5 2008 5:59 pm
Subject: RE: Multiple sidebars?

>Any help would be much appreciated.

Try this

http://www.easypagez.com/maps/side_bar_all_over.html

Ralph


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel  
View profile
 More options Oct 5, 6:09 pm
From: daniel <dajohnso...@gmail.com>
Date: Sun, 5 Oct 2008 15:09:36 -0700 (PDT)
Local: Sun, Oct 5 2008 6:09 pm
Subject: Re: Multiple sidebars?
Not sure what happen, but it is up now.

Thanks.

On Oct 5, 4:43 pm, Lan Mind <LANMIN...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin  
View profile
 More options Oct 5, 7:20 pm
From: Martin <warwo...@gmail.com>
Date: Sun, 5 Oct 2008 16:20:27 -0700 (PDT)
Local: Sun, Oct 5 2008 7:20 pm
Subject: Re: Multiple sidebars?
Try something like this (it's untested btw!):

function makeSidebar() {
var html = '', categoryHtml={}; // create an object to use as an
associative array of strings - an element for each marker category
for (var i=0; i<gmarkers.length; i++) {
if (!gmarkers[i].isHidden()) {
categoryHtml[gmarkers[i].mycategory]+='<a href="javascript:myclick(' +
i + ')">' + gmarkers[i].myname + '</a><br>';

}
}

for (i in categoryHtml){
// here you could add title html for each category of links
html+=categoryHtml[i];
}

document.getElementById("side_bar").innerHTML = html;

}

Martin.

On 5 Oct, 07:30, daniel <dajohnso...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel  
View profile
 More options Oct 5, 9:38 pm
From: daniel <dajohnso...@gmail.com>
Date: Sun, 5 Oct 2008 18:38:49 -0700 (PDT)
Local: Sun, Oct 5 2008 9:38 pm
Subject: Re: Multiple sidebars?
Martin, I added the suggested code.  But the only difference i am
noticing is the "undefined" before the first entry from the array.

I would think that I would need to have several "sidebar" class
instances. Just to clarify what I am thinking:
Checkbox---
   <div class="side_bar"></div>
Checkbox--
 <...."side_bar"...>

Is this reasonable?

On Oct 5, 6:20 pm, Martin <warwo...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel  
View profile
 More options Oct 6, 1:30 am
From: daniel <dajohnso...@gmail.com>
Date: Sun, 5 Oct 2008 22:30:02 -0700 (PDT)
Local: Mon, Oct 6 2008 1:30 am
Subject: Re: Multiple sidebars?
Ralph, thanks for the link, I think in essence this is what I am
trying to do.  with separate divs and separate sidebar instances.
That was how i would have done it, but really didnt think it through
enough.

What I am a little confused about is in the link, they use this:
 else if (gmarkers[i].myid == "#style4"){
123 html4 += '<a href="javascript:myclick(' + i + ')">' +
gmarkers[i].myname + '</a><br>';
124 document.getElementById("side_bar4").innerHTML = html4;
125 }

I understand the concept here, but what is "#style4". I had thought it
was a css style point to a div. but I cant seem to find it.

On Oct 5, 8:38 pm, daniel <dajohnso...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin  
View profile
 More options Oct 6, 1:55 am
From: Martin <warwo...@gmail.com>
Date: Sun, 5 Oct 2008 22:55:01 -0700 (PDT)
Local: Mon, Oct 6 2008 1:55 am
Subject: Re: Multiple sidebars?
Hi Daniel.

I think the main problem with my previously posted code was that the
javascript object has some built in methods or properties that were
being found by the for-in loop and being added to the HTML - that'd
explain the 'undefined' entries.

Here's a more refined approach.
Works much as the previous code but this time we create properties of
the categoryHTML object with a prefix of 'cat_'.
Then as we iterate through the properties of categoryHTML we check to
see if the property name beings 'cat_'.
If so we remove 'cat_' from the property name and assign that category
HTML to a container with an id that is the same as the category name.

Again the code is untested - i tried getting your page to load on my
PC but failed so couldn't test the new makeSidebar() function.

function makeSidebar() {
var categoryHTML={};    //      missing semi-colon added here
for (var i=0; i<gmarkers.length; i++) {
if (!gmarkers[i].isHidden()) {
categoryHTML['cat_'+gmarkers[i].mycategory] += '<a
href="javascript:myclick(' + i + ')">' + gmarkers[i].myname + '</
a><br>';

}
}

for(i in categoryHTML){
// check that i is a property (mycategory) that we've created and not
a built in property or method of the javascript Object
if(i.substr(0, 4)==='cat_'){
//      remove 'cat_' from the category property name
i=i.substr(4, i.length-4);
//      assign the category html to sidebar container with id that is same
as category
document.getElementById(i).innerHtml=categoryHTML[i];

}
}
}

And then within your HTML create the containers to hold the sidebar
for each category:

<div class="side-bar" id="theatre"></div>
<div class="side-bar" id="library"></div>
<div class="side-bar" id="interest"></div>
<div class="side-bar" id="parking"></div>

Don't forget - you need to create a sidebar container for each and
every category that you use.
Otherwise the line:

document.getElementById(i).innerHtml=categoryHTML[i];

will likely cause an error 'i is undefined'.

Martin.

On 6 Oct, 02:38, daniel <dajohnso...@gmail.com> wrote:


    Reply    Reply to author    Forward