I want to trigger a login validation to a web service on page 1 of a genie when the Next button is clicked. I'm trying to take the Username and Password fields and verify if they correctly authenticate. I can do this by placing Xbasic Validation on the password field which then gets triggered when Next is pressed. What I'd like to do is if the login is authenticated, run in the same script a second web service method to retrieve data to populate the remainder of the fields in the Genie with default values. I'm not able to find anything similar to the e._Set.fieldname.value that is available with the OnClick event of a button. I also don't see an option to return javascript to the browser even though this is a server side validation. Ideally what I'd do would be something similar to the code below which is from my login button on the first tab of the genie which works (I just want to eliminate the separate button and force the login from the Next button in the Genie):

username = e.datasubmitted.txtusername
passwrd = e.datasubmitted.txtpassword
loggedin = e.datasubmitted.LoggedIn

' Call web service function and authenticate username and password
securitytoken = f_KBA_Authenticate(username,passwrd)

' If authenticated, use the returned encrypted token to retrieve the member information from a separate web service
if securitytoken<>"0"
        'Retrieve the Dues Information from the Web Service
	MemberInfo = f_KBA_GetDuesInfo_JSON(securitytoken)
        'Set the fields on the form that are not variables
	e._set.Welcome.value = "Welcome "+alltrim(MemberInfo.FirstName)+" "+MemberInfo.LastName
        Dim jstxt as C
        'convert the returned values into a JSON object to use with populate
        jstxt = json_generate(MemberInfo)
        'Populate the remaining fields in the Genie
        js = "{dialog.object}.populate(" + jstxt + "); {dialog.object}.prepare();"
        serverside_cb18e6f958d0457f8ecc436423760136 = js
	'Display login error message
	serverside_cb18e6f958d0457f8ecc436423760136 = "A5.msgBox.show('WARNING','Login attempt failed.  Please try again.','O');"
end if
Any suggestions?