I'm trying to create a button to go back to the homepage on my server. I've created the buttonon but I'm not sure how to add an action to this button to go back, I'm also unsure as to how to refer to the home page.

I'm using Node to program.

This is what I've tried:

button(type="home", action="http://localhost:3020/") Home

This will create the button but when I click it, it doesn't actually go to this page. This is my first time trying to do any web development so it seems to be a steep learning curve for me!
Thanks in advance

Member Avatar for LastMitch

This will create the button but when I click it, it doesn't actually go to this page. This is my first time trying to do any web development so it seems to be a steep learning curve for me!

@sarah.mathieson.7

I'm not familiar with jade templates, I'm more used to Smarty templates. But to answer your question, you need to create a function command so that button will work.

Just think if you are using Adobe Flash software, you create a button and you need to add a command for it to work. It's the same situation as yours.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.