Explanation:
This page uses an event handler created by Expression Web. To create it
yourself, follow these steps:
- Add a button and then rt-clicked the button to edit the "Form Field
Properties". Give it the name "btnGo" or something similar.
- Now, click Panels | Behaviors in Expression. This will
display the behaviors window.
- Highlight your button. In the behaviors panel, choose Insert and
select "Open browser window".
- This will create a new action and shows you that it will be
called/triggered from an onClick event. Recall that we have done this
manually in the past.
- Now double-click in the behaviors panel where it shows your new
action (Open browser).
- This will open a dialog where you can choose the options you want
the new window to have. See below.
- Choose OK. Now press F12 to run your page. When you
examine the code, you will see that EW has added an onClick attribute to
your button tag. It has given your event handler a name and also listed
your properties that you chose.
- Now scroll up to the head part of your code. You will see a new
function called "function FP_openNewWindow()". This function/method can
now be used anywhere on your page. It has a bunch of code that will
define how to open the new window. It looks messy to humans but the
browser understands it perfectly. It looks weird because EW smushed all
the lines together to save space.
- Try adding another button. Make it go to another website by adding a
behavior to it just like you did with this one. You will discover that
EW uses the same function it created the first time. It just passes it
new arguments each time.