Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
perl subroutine call from javascript
cliffhanger
Hi,
I have a .ipl script that has embeded HTML/Javascript in it. Is it possible to make a subroutine(written in the perl section of the code) call from the javascript? If yes, what's the syntax?
Thanks
-Cliffhanger
Find more posts tagged with
Comments
Dwayne
No, this is not possible.
Variations on this question have come up several times in the templating forum related to FormAPI. The "abbreviated" version of the explanation: the perl is running on the server, the JavaScript on the client. By the time the client browser runs the JavaScript, the perl code has already been unloaded from memory on the server. So even if there WERE a communication method (there isn't) the routines wouldn't be available to call.
--
Current project: TS 5.5.2/6.1 W2K
cliffhanger
Hi Dwayne,
Thanks for stopping my restless search of such syntax
Is there any way to delete files from the repository through javascript code then?
-cliffhanger
Dwayne
Let's try this again.
JavaScript is
client
side code.
Repository is on the
server
.
Thus there is no (direct) way to delete something from the repository from JavaScript. The only way you could do it would be to tell the browser to load a URL which ran code (CGI, JSP, etc) on the server, to do the delete on your behalf.
--
Current project: TS 5.5.2/6.1 W2K
cliffhanger
hmmm, thanks...seems like you're quite annoyed at my lack of understanding of client/server architecture
If I am not geting too mcuh on your nerve, what would be the syntax to invoke that URL from javascript?
-cliffhanger
Dwayne
Sorry - I've realized that I must have confused you with someone else. I thought that we'd already had this discussion before, but I see from searching the forums that I was wrong. So I apologize for being somewhat "testy."
However, having said that - these forums really aren't intended to be a general web programming tutorial. Check some references on JavaScript. (A hint - focus on the '
location
' object)
(There, Smitty - was that better than last time? [wink])
--
Current project: TS 5.5.2/6.1 W2K