|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
I call a script to generate a sessionID and need it 2 times on this page...
Is there a way to get a result when I call a CGI-script via #include virtual=" ?
TIA joking
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
if it generates a result, then you have to "execute" it... it must be something like this:
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
I tried this code: <!--#set var="sid" value="<!--#exec cgi="script.cgi" -->" --> it dosen't work. what is wrong? I try to set a sessionID in the var sid...
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
umm... what do you actually want to do?
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
I have now 2 Refresh vai meta-Tags and I'm looking for a way to do this in one step. - the User call index.html
- this Document forward the User to the part of the Script which generate the sessionID
- after this the User will be forward to the UBB
I'm looking for a way to generate the sessionID (and add it to the Database) when the User call the index.shtml...
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
if I understand you correctly, js can solve yolur problem j.cgi: code:
#!/usr/bin/perl -w use strict;
my $SID = time;
write_to_db($SID);
print <<SES;
function SID () { return "$SID"; }
SES
sub write_to_db { # blah blah blah }
j.html: code: [qb]<html> <head> <script type="text/javascript" src="j.cgi"></script> </head>
<body>
<script type="text/javascript"> var SID = SID(); document.write("SESSION ID: "+SID); </script>
</body> </html> [/qb]
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
can I solve this problem without js?
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
ok... try the exec code wtihout the set var stuff... like: <b>SESSION ID IS <!--#exec cgi="script.cgi" --></b> etc... if it fails, use js...
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
Can I save the result of exec without js in a var?
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
in a what 'var'? you can not create a variable with html...
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
hmm... You can not do a ssi call inside a ssi call AFAIK... First you set a variable, then exec the cgi and you can access this var inside this cgi...
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
Thanks. I solved the problem.
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
How? If you write it here, it will be good for a future refence...
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
I call in every link. the first link is a the refresh-meta and the second link is for non javascript user. i see no other way without js...
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|