I did upto showing direction using custom network analyst.
I am trying to add elevation profile of the route result.
I made a gray box below but I do not know how to make it show elevation profile.
Attatched is the HTML. I changed the server url.
What script should I add?
You can use the elevation profile widget to display the profile for the route. Here's a sample from the help showing how this widget works.