PHP echo within form value

Alullysyncnef

New Member
I'm attempting to echo a div tag within a HTML form value. Im unable to display the contents of the div tag without messing up the form value. \[code\]<?php echo '<div id="demo"></div>';?>\[/code\]
Form value...\[code\]<input type="text" id="term" value="http://stackoverflow.com/questions/13783750/<?php echo'<div id="demo"></div>';?>">\[/code\]
What's outputted... (What's echoed inside the form value should be the current longitude and latitude)\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Geolocation search</title><script type="text/javascript" src="http://stackoverflow.com/questions/13783750/js/jquery-1.4.2.min.js"></script><script id="data" type="text/javascript" src="http://stackoverflow.com/questions/13783750/js/search.js" xmlData="http://stackoverflow.com/questions/13783750/data/data.xml"></script></head><body onload="getLocation()"><div id="controller"> <label>Search Term: <input type="text" id="term" value="http://stackoverflow.com/questions/13783750/<?php echo'<div id="demo"></div>';?>"> </label> <label> <select name="category" id="category"> <option value="http://stackoverflow.com/questions/13783750/name">Name</option> </select> </label> <input name="Search" type="button" id="searchButton" value="http://stackoverflow.com/questions/13783750/Search"></div><div id="result">&nbsp;</div><?php echo '<div id="demo"></div>';?><script>var x=document.getElementById("demo");function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML="Geolocation is not supported by this browser.";} }function showPosition(position) { x.innerHTML=" " + position.coords.latitude + "<br> " + position.coords.longitude; }</script></body></html>\[/code\]Is there soem other way to echo out the longitude and latitude from the that's loaded within the echo statement?
 
Back
Top