waarde uit functie gebruiken

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Ronald schuyff

ronald schuyff

17/11/2008 18:13:00
Quote Anchor link
hallo allemaal

ik zit met een probleem en na twee dagen stoeien kom ik er nog niet uit

help???????


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Language" content="nl">
</script>

<SCRIPT language=javascript src="../../optie-offerte/AutoComplete.js" type=text/javascript></SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<script src="../../optie-offerte/clienthint.js"></script>
<script src="http://maps.google.com/?file=api&v=2.x&key=ABQIAAAAVPQvw9jw55uC07gjHQddxhRbsDUmOvrqLo-ZZGhoX7jSKPAB-BTpIo-lbSNgN7521PbOQLbks5UkBw" type="text/javascript"></script>
<script type="text/javascript">
var gdir;
function initialize() {
if (GBrowserIsCompatible()) {
gdir = new GDirections();
GEvent.addListener(gdir, "load", onGDirectionsLoad);
GEvent.addListener(gdir, "error", handleErrors);

setDirections("maarssen, the netherlands", "maarssen, the netherlands", "nl_EU");
}
}
function setDirections(fromAddress, toAddress, locale)
{gdir.load("from: " + fromAddress + " to: " + toAddress, { "locale": locale });}
function handleErrors(){
if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
alert("Helaas is deze plaats niet gevonden.\nwij verzoeken u dan ook een andere plaats in te geven in de buurt van uw feestlocatie\nFout code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_BAD_KEY)
alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code);
else alert("An unknown error occurred.");
}

function onGDirectionsLoad(){document.getElementById("afstand").value = (Math.round(gdir.getDistance().meters)) ;}


</script>


<title>test</title>
</head>


<body onLoad="document.form.wie.focus(); initialize()" >
<body onload="document.form.wie.focus(); initialize()" onunload="GUnload()" >


<input id="afstand" onFocus="document.getElementById('afstand').focus();" name="afstand" size="23" value="0" style="float: left" ><body bgcolor="#FDF5EE" onLoad="document.form.wie.focus(); initialize()" topmargin="10"></p>
<p style="text-align: left">

<body onLoad="document.form.wie.focus(); initialize()" topmargin="10"><body onload="document.form.wie.focus(); initialize()" onunload="GUnload()" topmargin="10"></p>

<div id="search">

<form action="results.php" method="POST" id="zoekenForm" name="form" onsubmit="check();" style="width: 369px; height: 41px; position: absolute; left: 8px; top: 60px; font-family:Arial; font-size:10pt; color:#603F2B; text-align:left">

<input autocomplete="off" onkeyup="showHint(this.value)" type="text" name="wie" class="wieZoek" id="txt1" size="58" style="font-family: Arial; font-size: 10pt; color: #351B00" />
</p>

<div id="hints" style="position:absolute; left:2px; top:23px; width:351px; background-color:#E5BEA9; height:15px; text-align:left"><div style='width:350px;' id="txtHint">
<p style="text-align: center"></div>
</form>


</div>

</body>
</html>


ik wil met de waarde die in de textbox verschijnt (de berekende afstand) vermenigvuldigen met een waarde die vastlicht

dus wanner bv de afstand 10000 meter is dit vermenigvuldigen bv * 10 en de uitkomst weer in een textbox krijgen

wie o wie wil mij helpen

groetjes ronald


(zie voor een voorbeeld

http://www.partyfever-entertainment.nl/test/test1/zingendedj2.php

het gaat om de waarde die in de bovenste box komt.
 
PHP hulp

PHP hulp

14/05/2024 00:12:24
 
Thijs Damen

Thijs Damen

17/11/2008 18:39:00
Quote Anchor link
Gebruik code tags om je tekst heen.


daarnaast. google is op ajax
 
Tikkes C

Tikkes C

17/11/2008 18:49:00
Quote Anchor link
wat is ordelijk scripten toch leuk...niet? vooral in javascript dan.

en bas heeft hier een hele leuke bb parser...zet even code om je code...dat scheelt mij heel wat werk ;)
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.