savoym (2) [Avatar] Offline
#1
I have tried posting this question to a number of forums but cannot find any help. I am hoping to find help here. Any help/direction would be greatly appreciated. Thanks.

I am working with executing an ajax call using jQuery. It would appear that the URL in my call is getting called successfully but the bean is NOT executing.

Here is my jQuery code:

<script language="JavaScript">
$(function() {
$("#ARTransferForm\:toAccountNumber").blur(function() {
var toAccountNumber = $(this).val().substring(0,2);
$.get('changeSelectedFacilityCode.jsp', {text:toAccountNumber}, function(data) {
alert('This is what is in data' + data);
//$('select[id$=facilityCodes]').val($(data).find('span[id$=data]').text());
});
});
});
</script>

Here is my code in the changeSelectedFacilityCode.jsp page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%-- jsf:pagecode language="java" location="/src/pagecode/ChangeSelectedFacilityCode.java" --%><%-- /jsf:pagecode --%>
<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<head>
<title>changeSelectedFacilityCode</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<f:view>
<body>
<h:form>
<h:outputText id="data" value="#{transactionBean.selectedFacilityCode}"/>
</h:form>
</body>
</f:view>
</html>
savoym (2) [Avatar] Offline
#2
Re: Please HELP - Question on JSF+jQuery
I was able to move forward and get my question answered at another forum. Thanks anyway.
bear.bibeault (675) [Avatar] Offline
#3
Re: Please HELP - Question on JSF+jQuery
That was quick. Glad that you got your question answered.