Assistance or advice with an application required

N

NZed

I have a particular application when I am setting up to sell products
online.

I was looking for a solution where people wanting more information
could
click on a button or text and a tool tip would appear ..this works but
differently on different browsers.

So I saw this feature on a local website which would be ideal...I
think...your thoughts ?

go to www.guitargallery.co.nz

Press the text "The best guitars in the country" link
http://guitargallery.co.nz/#

It then opens the text and flows down the page....simple and effective.
Particularly useful for our application to keep the information minimal
and
then the customer then can stay on the same page.

Can someone tell me how this works...and a simple way to replicate this
repetedly.? As I will have over 300 products to list....(max 25 per
page)
and each one will have its description but will have a pull down box to
explain its directions for use on request.

Is there any features in Front page that could save me time.

Looking forward to your feedback

NZed
 
J

Jon Spivey

That's very easy to do. You can just copy the function called toggle from
the page.
function toggle( id ) {
div = document.getElementById( id );
div.style.display = ((div.style.display == 'none')?'block':'none');
if ( div.style.display == 'none' ) {
document.getElementById( id + 'arrow' ).src =
'/images/closed-arrow.png';
} else {
document.getElementById( id + 'arrow' ).src = '/images/open-arrow.png';
}
return true;
}

The only problem is that script will error out on some browsers. It's not a
good idea to use names like div and id as variables. Change to div to d and
id to i and it will work fine.
 
M

Murray

You can also use FP2003's Change Property behavior to toggle the display of
those sections - it might be easier for the OP....
 
J

Jon Spivey

Change property doesn't do toggle - it can show something or hide something
but it can't do if this is shown hide, it if it's hidden show it. The script
from the OPs page is good for this job apart from the div/id naming issue.

Also when you hit change property it shows an option for visibility which
looks good but it uses visibilty:hidden rather than display:none. Hidden
takes up space on the page which is not what the poster wants. Of course he
could manually type display:none
 
J

Jon Spivey

That's an excellent example - takes the FP behaviours as far as they can
go. Maybe the toggle will be in the next version :)
 
S

Stefan B Rusynko

No need to hack it in, just create a custom behavior using your sample code and it's CSS
See http://msdn.microsoft.com/library/d...a/html/odc_fpCreatingBehaviors.asp?frame=true

--




| Heh - it could be hacked in, but the next edit in FP would probably unhack
| it! 8)
|
| --
| Murray
| ============
|
| | > That's an excellent example - takes the FP behaviours as far as they can
| > go. Maybe the toggle will be in the next version :)
| >
| > --
| > Cheers,
| > Jon
| > Microsoft MVP
| >
| > | >> Ahh - right - it doesn't toggle. Well, one partial workaround would be
| >> as shown in this demo here -
| >>
| >> http://www.murraytestsite.com/collapsiblelist.htm
| >>
| >> It uses some CSS, and the FP Change Property behavior.
| >>
| >>
| >> --
| >> Murray
| >> ============
| >>
| >> | >>> Change property doesn't do toggle - it can show something or hide
| >>> something but it can't do if this is shown hide, it if it's hidden show
| >>> it. The script from the OPs page is good for this job apart from the
| >>> div/id naming issue.
| >>>
| >>> Also when you hit change property it shows an option for visibility
| >>> which looks good but it uses visibilty:hidden rather than display:none.
| >>> Hidden takes up space on the page which is not what the poster wants. Of
| >>> course he could manually type display:none
| >>>
| >>> --
| >>> Cheers,
| >>> Jon
| >>> Microsoft MVP
| >>>
| >>>
| >>> | >>>> You can also use FP2003's Change Property behavior to toggle the
| >>>> display of those sections - it might be easier for the OP....
| >>>>
| >>>> --
| >>>> Murray
| >>>> ============
| >>>>
| >>>> | >>>>> That's very easy to do. You can just copy the function called toggle
| >>>>> from the page.
| >>>>> function toggle( id ) {
| >>>>> div = document.getElementById( id );
| >>>>> div.style.display = ((div.style.display == 'none')?'block':'none');
| >>>>> if ( div.style.display == 'none' ) {
| >>>>> document.getElementById( id + 'arrow' ).src =
| >>>>> '/images/closed-arrow.png';
| >>>>> } else {
| >>>>> document.getElementById( id + 'arrow' ).src =
| >>>>> '/images/open-arrow.png';
| >>>>> }
| >>>>> return true;
| >>>>> }
| >>>>>
| >>>>> The only problem is that script will error out on some browsers. It's
| >>>>> not a good idea to use names like div and id as variables. Change to
| >>>>> div to d and id to i and it will work fine.
| >>>>>
| >>>>> --
| >>>>> Cheers,
| >>>>> Jon
| >>>>> Microsoft MVP
| >>>>>
| >>>>> | >>>>>>I have a particular application when I am setting up to sell products
| >>>>>> online.
| >>>>>>
| >>>>>> I was looking for a solution where people wanting more information
| >>>>>> could
| >>>>>> click on a button or text and a tool tip would appear ..this works
| >>>>>> but
| >>>>>> differently on different browsers.
| >>>>>>
| >>>>>> So I saw this feature on a local website which would be ideal...I
| >>>>>> think...your thoughts ?
| >>>>>>
| >>>>>> go to www.guitargallery.co.nz
| >>>>>>
| >>>>>> Press the text "The best guitars in the country" link
| >>>>>> http://guitargallery.co.nz/#
| >>>>>>
| >>>>>> It then opens the text and flows down the page....simple and
| >>>>>> effective.
| >>>>>> Particularly useful for our application to keep the information
| >>>>>> minimal
| >>>>>> and
| >>>>>> then the customer then can stay on the same page.
| >>>>>>
| >>>>>> Can someone tell me how this works...and a simple way to replicate
| >>>>>> this
| >>>>>> repetedly.? As I will have over 300 products to list....(max 25 per
| >>>>>> page)
| >>>>>> and each one will have its description but will have a pull down box
| >>>>>> to
| >>>>>> explain its directions for use on request.
| >>>>>>
| >>>>>> Is there any features in Front page that could save me time.
| >>>>>>
| >>>>>> Looking forward to your feedback
| >>>>>>
| >>>>>> NZed
| >>>>>>
| >>>>>
| >>>>>
| >>>>
| >>>>
| >>>
| >>>
| >>
| >>
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top