bonjour, j'ai deux champs de texte en asp, et une fonction javascript, je veux quand j'appelle cette fonction modifier les valeurs de ces deux champs, j'ai fait comme ca mais rien ne marche :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function LocalisationAvecLambert(adresse ,nom ,lat,lgt,emplacement,prop,TP,statut,auto,ddauto,dfauto,superficie,redevance,somme) {
    var lt = parseFloat(lat.replace(',','.'));
    var lg = parseFloat(lgt.replace(',','.'));
    // creating source and destination Proj4js objects
            // once initialized, these may be re-used as often as needed
            var Source = new Proj4js.Proj('EPSG:27563');     //Source coordinates in LCC, south of France
            var Destination = new Proj4js.Proj('EPSG:4326');    //Destination coordinates will be in Longitude/Latitude
            // transforming point coordinates
            var p = new Proj4js.Point(-76.0,45.0);   //any object will do as long as it has 'x' and 'y' properties
            Proj4js.transform(Source, Destination, p);      //do the transformation.  x and y are modified in place
       lt=p.x;
       lg=p.y;
       document.getElementById('latitude').value.value=p.x;
       document.getElementById('longitude').value=p.y;
   ....}
et

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
<td>
    <asp:TextBox ID="latitude" MaxLength="50" runat="server" CssClass="txt" /><asp:RequiredFieldValidator
        runat="server" ID="Req2" ForeColor="red" ControlToValidate="latitude" ErrorMessage="*"
        ValidationGroup="Creation" />
</td>
<td>
    <label>Coordonnées Y  :</label>
</td>
<td>
    <asp:TextBox ID="longitude" MaxLength="50" runat="server" CssClass="txt"></asp:TextBox><asp:RequiredFieldValidator
        runat="server" ID="Req3" ForeColor="red" ControlToValidate="longitude" ErrorMessage="*"
        ValidationGroup="Creation" />
</td>

une idée ?