The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

>>> invalid html, id="imagePlaceHolder" not unique

you end up with 2 id's named "imagePlaceHolder" in a single html page, one for each of the modals. To be a valid html page, id's must be unique within a page. So our chapter4/views/index.ejs produces an invalid html page.

It look like the examples were intended to be worked with separately. If you wish to combine them on the same HTML page, you will have to make the necessary adjustments so that there are no duplicate IDs.

It look like the examples were intended to be worked with separately. If you wish to combine them on the same HTML page, you will have to make the necessary adjustments so that there are no duplicate IDs.

Have you actually worked through the examples? Because if you have, you would know that while you work on each modal separately, the end result is a single index.ejs file that will render a single html file containing both modals, one for signup and one for login.

If you take a look at the book's source code (download from http://www.sitepoint.com/books/nodejs1/code.php), you'll see that there are 2 modals in a single index.ejs file and there are 2 id's with the same value (imagePlaceHolder, one on line 25 and the other on line 48), which is not valid html.

If the book's source code produces invalid html, that seems like a mistake to me. If so, then the source code needs to be modified, and so does any styling or behavior that targets that id.