- Home /
PLEASE help me to translate this javascript to C# for my VS10 application
var loadUrl = "ajax_load.php"; $("#load_basic").click(function(){ $("#result").html(ajax_load).load(loadUrl); }); **//AND this one below**
$("#load_dom").click(function(){
$("#result")
.html(ajax_load)
.load(loadUrl + " #picture");
});
Answer by Justin Warner · Apr 14, 2011 at 05:25 PM
// Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden // Do test the code! You usually need to change a few small bits.
using UnityEngine; using System.Collections;
public class MYCLASSNAME : MonoBehaviour { FIXME_VAR_TYPE loadUrl= "ajax_load.php"; $("#load_basic").click(function(){ $("#result").html(ajax_load).load(loadUrl); }); //AND this one below
$("#load_dom").click(function(){
$("#result")
.html(ajax_load)
.load(loadUrl + " #picture");
});
}
Read the comment up top.. Doubt it'll work, but might... And this is script, reason I'm posting as answer, or else I would have commented. Sorry.
Your answer
Follow this Question
Related Questions
Can someone translate this to Javascript? 1 Answer
C# into JavaScript 1 Answer
Attaching Main Camera to a GameObject 1 Answer