Vote count:
0
I'm trying to use jQuery to load a file into a textarea form for the project I'm working on, however, nothing actually loads when the button is clicked.
<html>
<head>
<title>CodeEditor</title>
<meta charset = "utf-8">
<script type = 'text/javascript' src = 'http://ift.tt/ruu4ao'></script>
<script type = 'text/javascript'>
$(document).ready(function(){
$("button").click(function(){
$("#editor_area").load("test_file.txt");
});
});
</script>
</head>
<body>
<button>Get Content</button>
<main>
<form>
<textarea rows = "50" cols = "135" id = "editor_area"></textarea>
</form>
</main>
</body>
Here's the relevant code. I'm thinking it's a problem with the file path because I tested jQuery and it was working fine.
asked 35 secs ago
jQuery File Paths
Aucun commentaire:
Enregistrer un commentaire