Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hey,

Sorry if this comes off as a dumb question, I'm pretty new to couch and web development in general.

I'm trying to embed a script into my blog_list.html page to handle some navbar interaction, but it doesn't seem to be working. But when I embed that same script into my index.html page that doesn't use php at all, it works fine.

So my question is: why does the javascript not work? I don't know if this is a couch thing or a php thing, so if its the latter I apologize.
Okay I just realized I made a mistake: if I put the script in blog.php the script works on the page-view. But if I put it in blog-list it does NOT work in the list view, even if I adjust the path of the script src to account for blog-list being in the snippets folder.

Is this something to do with blog-list being in the snippets folder? Maybe because you can't access it directly? I don't know.
Hi Taylor,

Rest assured, *anything* that you can use in a static HTML page can be used in its Couchified form too.
Couch does not make any changes to your markup (which includes how you linked the JS file into it).

As to why the particular JS is working in the static version but not with Couch can be easily found out by comparing the static HTML with that outputted by Couch (by doing a view-source of the problematic list-view).

The two should be identical - pay special attention to whether the JS appears on the page or not. Or if there are any changes in the way it appears in the two versions.

Keep us posted.
False alarm. I must've done something wrong along the way because when I fiddled with the code a little bit more it worked. Thanks for your help though!
4 posts Page 1 of 1