Pages: 1 2 3 4

—-

Download the example code

—-

Step 1 – A simple form

We start out with an HTML page with a form.

We want to provide some extra assistance with filling out the form. (What is e-mail? I’ve heard the term before, but… :p) We want a button next to the field and when the user clicks on it, a box should show up, giving the user information about that specific field.

Step 2 – Adding the box and buttons
We’ll start with adding the box.

[snip html-source]code/llama-teleport/step2a.html[/snip]

In this case it is a div with in it an image of a llama, the div the message will be put into and a close button. Of course you can leave out the image and simply put the message in the main div. The box is stuck in the lower left corner by some CSS (which can view by downloading the example code).

You’ve might noticed that the close button call function llama_hide(), we need to define this as well as a function to show the box.

[snip js-source]code/llama-teleport/step2b.js[/snip]

Last up is adding the buttons for each of the fields. For now the buttons will simply display an empty box, but we’ll replace that with the RPC call later on.

[snip html-source]code/llama-teleport/step2c.html[/snip]

Pages: 1 2 3 4