Please look at this JQuery tutorial
JSP page
<form method="post">
Enter City :
<input id="cityName" name="cityName" size="30" type="text" />
<input id="getWeatherReport" name="getWeatherReport" type="button" value="Get Weather" />
</form>
<div id="weatherReport" class="outputTextArea"></div>
AJAX call
<script type="text/javascript">
$(document).ready(function() {
$("#getWeatherReport").click(function(){
$cityName = document.getElementById("cityName").value;
$.post("WeatherServlet", {cityName:$cityName}, function(xml) {
$("#weatherReport").html( $([COLOR="Red"]"report"[/COLOR], xml).text() );
});
});
});
</script>
what is “report” here . I don’t see this in the JSP page .
If I rename it say “myreport” . Will it still work ?
my question is : Is “report” a keyword in JQuery ? or Can I write anything in that place ? Or It some dependency elsewhere ?