Link to jump down the page

Joined
Feb 12, 2010
Messages
10
Reaction score
0
Points
1
I've used the HTML snippet function to add an <a href="# and the coinciding <a name=" further down the page. After publishing, and testing locally, when I click on the link at the top, it just opens up another page...

Surely this can be done via iWeb. Surely this doesn't need to actually be "live" to work.

(I know, your name is not Shirley...):Smirk:
 
OP
M
Joined
Feb 12, 2010
Messages
10
Reaction score
0
Points
1
Thanks, Matteo...

I cut and pasted this at the top of my page, in an HTML snippet window:

<A HREF="#codeword">Jump down</A>



Then in another snippet at the bottom I pasted this:

<A NAME="codeword"> You have jumped to here!
 
Joined
Jun 18, 2006
Messages
191
Reaction score
5
Points
18
Location
Minneapolis
Your Mac's Specs
MacBook Pro
You need to close the "Anchor" tag with </a>

<A NAME="codeword"> You have jumped to here!</A>
 
Joined
Dec 16, 2010
Messages
61
Reaction score
0
Points
6
Thats true. Make sure your a name anchor is setup correctly.

This is the opening in a new page syntax.

<a href="codeword or url" target="_blank">Wherever you jump to</a>

Also Im not sure about the rest of your code but if writing HTML I wouldn't swap and change between font sizes, keep it either as capitals or lower case.

Closing tags is such a common mistake alongside spelling.

If closing that tag doesn't work then can you paste more code..?
 
OP
M
Joined
Feb 12, 2010
Messages
10
Reaction score
0
Points
1
thanks for the response, guys. Alas, while I WAS missing the closing of the anchor tag, it still doesn't seem to be working... will double-check and re-publish...

As far as the rest of the code, since I'm just dragging and dropping the snippets in place via iWeb, I'm not sure how best to get the rest of the code for you to see....
 
OP
M
Joined
Feb 12, 2010
Messages
10
Reaction score
0
Points
1
FYI I found this explanation, on Cedrick's iWebFAQ site:

"What happens when you add an HTML Snippet to a page in iWeb is:

- iWeb creates a new page for the HTML Snippet
- iWeb adds the code you add to the Snippet into this new page
- iWeb embeds this new HTML Snippet page into the page you added the HTML Snippet to using an iFrame


Result: the code isn't where it's meant to be. The code isn't on the page you added the HTML Snippet to but is in another page which is just embedded into the page you added the Snippet to.


At times that may be satisfying/sufficient/good enough but in some cases that makes the codes not working the way they are supposed to work. This is especially true for things which need to expand like Tell a friend widgets, Highslide photos, Drop down menus, ... since HTML Snippets are iFrames with fixed sizes the codes don't get the additional room they need to display properly. That’s why it sometimes is necessary to use an alternative way to embed HTML in your iWeb created website."

I hope his eBook is still for sale :)
 
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top