0

piers, I actually may not have explained myself correctly but in one of the posts, I do use data-image but since it is dynamic, it incorrectly puts out code.

If someone else wants to look at a live site, I can PM you the link :)

0

I sent some of you guys a private link to the site but havent gotten any responses :S

0

Different way of solving the issue. Javascript hides the content until you trigger showing it.

0

The problem is that the presentation doesnt make sense.

Im selecting a drawing to be shown as a image. Presenting it as a hidden content is kind of strange...

0

Has anyone read over the library and the private link with the code ???

Thank you

0

In middle of article we see google implementing

drop down menu showing small thumbnail pictures and text in a >"smartphone like" grid.

In a similar way to that switchcontent script

0

(Sorry I didnt see that this had another page)

Well, sadly, I cant view the code that Google implemented to get a idea on how they did it and mixing this with the switchcontent script is personally a bit confusing to me as I see no relation between the two. Could you clear it up please?

Thank you for all the help

0

They do not how it every time so maye being tested. Are there are other icons top right when you are signed into google? These work i the same way.

Using switchcontent you put your content (eg html for your grid) inside a div which the switchcontent script hides.

Onclick (can be changed) the div is displayed.

0

Ive also thought about the switchcontent script:

Wouldnt the problem be basically the same? When I dynamically generate the drop down menu, wouldnt the output be "messed up"?

Like I mentioned this is the code I currently have:

                               var selecthtml='Things: <select name="d" id="d">'

                                    for (var i=0;i<data.length;i++)
                                        {    //start for  

                                            var r = data[i];          
                                            var n = r[0]; 


                                            var c = r[1]; 

                                            if (i==0)
                                            {
                                                selecthtml=selecthtml+'<option value="'+c+' data-image="icons/icon1.png" selected="selected">'+n+'</option>';
                                            }
                                            else
                                            {
                                                selecthtml=selecthtml+'<option value="'+c+' data-image="icons/icon1.png">'+n+'</option>';
                                            }




                                        }  //end for

                                        selecthtml=selecthtml+'<option value="Default">Default</option>';
                                        selecthtml=selecthtml+'</select>';

But it generates this:

<option icon1.png"="" icons="" value="c data-image=">n</option>

As you can see with a incorrect order. I imagine it has something to do with the " and the '....but Im not sure how to fix it.

0

Im going to retry "switchcontent" I guess but It will change a lot of my code structure and the way Ive thought things out...

0

Implemented switchcontent but It semtidoesnt work.

As a standalone page, it works. But when I implement it inside a div as a "pop up div" so to speak, it completely breaks. Im not sure if switchcontent was made for this or not as it takes all the comboboxes and changes them....should I be allowed to control which???

Anyways, I like Google's implementation a lot more, but I cant see to get how to do it. Any ideas?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.