I am trying to figure out how to have 2 spans combine information to output on screen.
I get parts of the output correct, but i can't find where to put the added text from the second span to complete it properly. I've moved the 0 mi), around but cannot get it to come up when the # of miles is presented to the screen. My output is "Asian Art Museum (3486.4 I cannot get the mi) to add the the output.

      <li><a href="http://www.asianart.org/" target="_blank">Asian Art Museum</a><span id="geo1"> (</span><span id="distance1"> 0 mi)</span></li>
      <li><a href="http://bit.ly/93E5VI" target="_blank">City Hall</a><span id="geo2"> (</span><span id="distance2"> 0 mi)</span></li>
      <li><a href="http://heartofthecity-farmersmar.squarespace.com/" target="_blank">Heart of the City Farmer's Market</a><span id="geo3"> (</span><span id="distance3"> 0 mi)</span></li>
      <li><a href="http://www.sfcablecar.com/" target="_blank">Cable Car turnaround</a><span id="geo4"> (</span><span id="distance4"> 0 mi)</span></li>
      <li><a href="http://www.flysfo.com/" target="_blank">San Fran Int'l Airport</a><span id="geo5"> (</span><span id="distance5"> 0 mi)</span></li>
2 Years
Discussion Span
Last Post by JorgeM

Are you trying to update the value client side? If so, you can use some javascript. here is an example...

    <a href="#" >Asian Art Museum</a> ( <span id="distance1">0</span> mi )

    var dist1 = document.getElementById("distance1")
    dist1.innerText = 3486.4

Yeah, thank you, i can see it now. I was confused and had the 0 mi) all together, instead of spreading it out properly in my inline statement.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.