Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

how do link buttons

Forum home » Delegate support and help forum » Dreamweaver Training and help » How do i link buttons to anchors?

How do i link buttons to anchors?

ResolvedVersion CS3

Lynn has attended:
Dreamweaver Introduction (2 days) course

How do i link buttons to anchors?

how do I link buttons to anhcors?

RE: how do i link buttons to anchors?

Hi Lynn,

That's a good question.

You may be familiar with the GoToUrl behaviour in Dreamweaver. If not, I'll explain it here.

First create your anchor. Perhaps call it 'myAnchor'. Normally to jump to the anchor using a link, you would link to #myAnchor, the hash indicating that the browser should jump down to the appropriate anchor.

Then create your button. Go to Insert -> Form -> Button, and put details in for button (you can usually leave as default). Dreamweaver often prompts you to ask if you want a Form tag as well - this is up to you. It shouldn't make a difference for the outcome of this task.

Then select your new form button. Now go to your Behaviours tab (if you can't find it, go to Window -> Behaviours). At the top of the behaviours tab there is a little 'plus' button. Click this to bring up a menu of all javascript/behaviours you can apply to your button.

Choose the 'Go To URL' option. A dialogue box appears. You will probably only have one option for 'Open in', and that will be 'Main window'. This is fine. In the 'URL' field, type a hash and then the name of your anchor. eg. #myAnchor

Press OKAY and then test out your page. When you press the button, you should be jumped down (or up) to the appropriate anchor.

I hope this answers your question. If it does, please help by marking this question as 'resolved'. I look forward to answering any further questions you may have.

Kind regards, Rich

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Dreamweaver tip:

JumpMenu in new window

When inserting a jumpmenu to a page, the only option available for 'open in' is usually 'main window'. There would be other options available if the page was a frameset.

To change the jumpmenu to open in a new window, change the target parameter of the selectbox in your code to 'window.open()'.

eg.

<select name="menu1" onChange="MM_jumpMenu('window.open()',this,0)">


source:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16166& ;sliceId=1

View all Dreamweaver hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.