Help - Search - Members - Calendar
Full Version: Here we go again
HTMLHelp Forums > Web Authoring > General Web Design
TekEss
Sorry guys but if I knew what this was called,I would be able to search for it. Not having any luck in describing it to Google.

I would like to add something similar to this (in concept) to my site Spice Guide

Something that changes text in the cell when the button is pushed. All I can think of is linking a bunch of new pages for the buttons...

Can you point me to what I am researching to do this?


Thanks
Darin McGrew
I recommend that you not follow their example. Their links do nothing when JavaScript is disabled/unavailable. If you do use JavaScript, then I recommend you avoid using href="javascript:..." as they do. Instead, put a real URL in the HREF attribute and put the JavaScript in the ONCLICK event handler. The FAQ entry How do I create a link that opens a new window of a specific size? has a good example of this.
TekEss
Thanks Darin, thats a great link that answers some other questions I have.

With the onclick event, ia there a way to have the info load within the same cell rather than a popup window?
pandy
The same PAGE you mean? happy.gif
www.quirksmode.org/js/blockinvi.html
TekEss
yes pandy, in the same page, adjacent cell just as in the link from my first post.

I made buttons in one cell, and have a blank cell next to it. I want the info from each button to display within the adjacent cell as my first post.
TekEss
just followed your link pandy, yes that is very close to what I want. I just want each of 10 buttons to display their own text and replace the previous buttons text as well
TekEss
OK, I have changed things up a bit to make it easier. If I click a spice using internet explorer it jumps to the description of that spice....however when using firefox, it does nothing.

Can you tell me why ? http://www.bbqtalk.ca/herb.html
Darin McGrew
You use <a name="#Allspice"> rather than <a name="Allspice">.

Also, I noticed that you don't have a closing </a> tag for the <a name=...> tag. It should also have content, and cannot contain block-level elements. And I recommend avoiding the <font> tag.

So I recommend something like this:
CODE
<h3><a name="Allspice">Allspice</a></h3>

A more modern approach is:
CODE
<h3 id="Allspice">Allspice</h3>
although this doesn't work in some obsolete browsers like NN4.
TekEss
QUOTE(Darin McGrew @ Dec 18 2006, 08:41 PM) *

You use <a name="#Allspice"> rather than <a name="Allspice">.

Also, I noticed that you don't have a closing </a> tag for the <a name=...> tag. It should also have content, and cannot contain block-level elements. And I recommend avoiding the <font> tag.

So I recommend something like this:
CODE
<h3><a name="Allspice">Allspice</a></h3>

A more modern approach is:
CODE
<h3 id="Allspice">Allspice</h3>
although this doesn't work in some obsolete browsers like NN4.


Darin, looks like I have some work ahead of me.

If I change the code to
CODE
<h3><a name="Allspice">Allspice</a></h3>

what do I change in the "Allspice" description that follows?

Is h3 universal or progressive... each link is h3 or h3, h4, h5 etc...?

Thanks
Darin McGrew
QUOTE(TekEss @ Dec 18 2006, 06:40 PM) *
If I change the code to
CODE
<h3><a name="Allspice">Allspice</a></h3>

what do I change in the "Allspice" description that follows?
You currently have
CODE
<a name="#Allspice">
<h3><font color="#000099" face="Arial">Allspice</font></h3>

Just replace that with
CODE
<h3><a name="Allspice">Allspice</a></h3>
and leave the rest alone.
TekEss
Thanks for your help...got it all fixed and uploaded!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.