|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello.
I'm trying to modify an XSLT page that contains a submit button. The submit button ultimately executes some JS. However, I would like to execute a SQL Server Query to check some data when the button is pressed, but prior to the code in the JS function executes. How would I do that? It is my understanding I cannot execute any ASP or VBScript code from within the XSLT. Is there some JS that will allow me to execute an ASP page then return to the JS. Thanks in advance for you help. John. |
|
#2
|
|||
|
|||
|
Short answer: no.
More useful answer: ASP/VBScript runs on the server, Javascript runs on the client. The only way the two can communicate with each other is through http requests/responses. This means either you're going to have to submit the form to get your SQL to run, or you going to have to use Javascript to make an asynchronous (hidden to the user) request to an ASP page that executes the SQL and returns a response that the Javascript uses for whatever. The easier option by far is to post the form, do your processing, and return your results. If you want to persue the asynchronous Javascript option you can start a new thread in the HTML, Javascript & CSS forum or I can move this one over there for you. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Call SQL Server from XSLT. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|