Rufen Sie JavaScript aus dem Code im ASP.NET -Webformular anJavaScript

Javascript-Forum
Anonymous
 Rufen Sie JavaScript aus dem Code im ASP.NET -Webformular an

Post by Anonymous »

Ich brauche Hilfe, um diese JavaScript -Funktion aufzurufen, nachdem GridView2 mit Informationen aus einer SQL -Abfrage aktualisiert wurde. Die GridView -Aktualisierung der Datenbank ist kein Problem, und ich kann eine Schaltfläche verwenden, um die JavaScript -Funktion manuell aufzurufen. Ich möchte jedoch die Funktion automatisch aufrufen, wenn die GridView aktualisiert wird. Das JavaScript muss auf der Client -Seite ausgeführt werden, es fügt Objekte zu einer drei.js -Szene hinzu, die Daten in der GridView beziehen sich nur auf den Dateiweg, einen eindeutigen Objektnamen und Koordinaten. Ich weiß

Code: Select all

                function yourJavaScriptFunction(rowIndex) {

var x = rowIndex;
var file_path = getCellValue(x, 7); // Get the value from the second row, third column
if (file_path) {
console.log("Cell value: " + file_path);
} else {
console.log("Row or cell not found, get filepath."+ ' '+file_path);
alert("Row or cell not found,get filepath.");
}

var object_name = getCellValue(rowIndex, 1);
if (object_name) {
// alert(object_name);
console.log("Cell value: " + object_name);
} else {
console.log("Row or cell not found, get object name.");
alert("Row or cell not found, get object name.");
}

// alert('Button in row ' + rowIndex + ' clicked!');
//alert(value);

module.add_Object(file_path, object_name);

//add_Object();
// mytest.add_Object();
return false; // Prevent postback if needed
}




















Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post
  • Rufen Sie JavaScript aus dem Code im ASP.NET -Webformular an
    by Anonymous » » in C#
    0 Replies
    5 Views
    Last post by Anonymous
  • Rufen Sie JavaScript aus dem Code im ASP.NET -Webformular an
    by Anonymous » » in C#
    0 Replies
    2 Views
    Last post by Anonymous
  • Rufen Sie JavaScript aus dem Code im ASP.NET -Webformular an
    by Anonymous » » in C#
    0 Replies
    1 Views
    Last post by Anonymous
  • Inkrementelle Migration von ASP.NET zu ASP.NET CORE mit YARP -Proxy
    by Anonymous » » in C#
    0 Replies
    15 Views
    Last post by Anonymous
  • So führen Sie JavaScript von C# in ASP.NET aus
    by Guest » » in C#
    0 Replies
    6 Views
    Last post by Guest