Click here to Skip to main content
15,885,869 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Invoking a modal popup from the codebehind Pin
bgriffin_tpa5-Apr-07 5:15
bgriffin_tpa5-Apr-07 5:15 
QuestionBest Web 2.0 website? Pin
wojti4-Apr-07 4:25
wojti4-Apr-07 4:25 
AnswerRe: Best Web 2.0 website? Pin
Vasudevan Deepak Kumar4-Apr-07 7:04
Vasudevan Deepak Kumar4-Apr-07 7:04 
QuestionRe: Best Web 2.0 website? Pin
badgrs5-Apr-07 3:39
badgrs5-Apr-07 3:39 
AnswerRe: Best Web 2.0 website? Pin
Bradml5-Apr-07 3:41
Bradml5-Apr-07 3:41 
AnswerRe: Best Web 2.0 website? Pin
Guffa5-Apr-07 14:56
Guffa5-Apr-07 14:56 
Questionwhy Activex control is loaded only once Pin
indian1434-Apr-07 2:15
indian1434-Apr-07 2:15 
QuestionAny cgi/perl/ssi programmers here? Pin
benjymous4-Apr-07 1:24
benjymous4-Apr-07 1:24 
I'm being driven mad trying to find a solution that something that should be deceptively simple

I have a small cgi script /cgi-bin/time.cgi that takes an optional "start" argument

The functionality should be like this

* When the script is called with the start param, it sets a variable to the current time
* Every subsequent call should display the difference from that time (and thus let me profile different SSI includes to work out which bits are slow and need optimising)

example profile test page:
<--#include virtual="/cgi-bin/time.cgi?start=1" -->
<--#set var="SOMEVAR" value="some value" -->
<--#include virtual="/header.shtml" -->
<--#exec cmd="/cgi-bin/time.cgi" -->
<--#include virtual="/cgi-bin/maincontent.cgi?$QUERY_STRING" -->
<--#include virtual="/cgi-bin/time.cgi" -->
<--#include virtual="/footer.shtml" -->
<--#include virtual="/cgi-bin/time.cgi" -->


My big problem comes with the "start" functionality - for the life of me I'm unable to set an ENV variable from within a cgi script and have it visible to the next script (vars set in SSI, such as SOMEVAR in the example can be seen within the cgi)

Any ideas?

Here's the perl code in time.cgi
#! /usr/bin/perl

use Time::HiRes;
use CGI;

my($cgiquery) = new CGI;

print "Content-type: text/html\n\n";

if( $cgiquery->param('start') )
{
  print "<-- start -->\n";
  $ENV{'PROFILE_TIME'} = Time::HiRes::time;
}
else
{
  print "<-- continue -->\n";
}

my ($starttime) = $ENV{'PROFILE_TIME'};

print "<-- PROFILE: ";
print Time::HiRes::time - $starttime;
print " --> \n";
print "<-- starttime = $starttime -->\n";



QuestionFull Tooltip not working with Firefox Pin
Nilesh Thakkar4-Apr-07 1:02
Nilesh Thakkar4-Apr-07 1:02 
AnswerRe: Full Tooltip not working with Firefox Pin
Shog94-Apr-07 6:12
sitebuilderShog94-Apr-07 6:12 
AnswerRe: Full Tooltip not working with Firefox Pin
Vasudevan Deepak Kumar4-Apr-07 7:05
Vasudevan Deepak Kumar4-Apr-07 7:05 
QuestionDrag and Drop functionality Pin
rachitdamani4-Apr-07 0:11
rachitdamani4-Apr-07 0:11 
QuestionJavacript Pin
AnhTin3-Apr-07 23:17
AnhTin3-Apr-07 23:17 
AnswerRe: Javacript Pin
badgrs4-Apr-07 0:23
badgrs4-Apr-07 0:23 
GeneralRe: Javacript Pin
AnhTin4-Apr-07 0:37
AnhTin4-Apr-07 0:37 
AnswerRe: Javacript Pin
Guffa4-Apr-07 5:18
Guffa4-Apr-07 5:18 
GeneralRe: Javacript Pin
AnhTin4-Apr-07 16:25
AnhTin4-Apr-07 16:25 
AnswerRe: Javacript Pin
Guffa4-Apr-07 23:18
Guffa4-Apr-07 23:18 
QuestionPHP Select boxes Pin
john343-Apr-07 8:32
john343-Apr-07 8:32 
AnswerRe: PHP Select boxes Pin
Shog93-Apr-07 14:39
sitebuilderShog93-Apr-07 14:39 
QuestionCSS Underlining Pin
Matt Newman3-Apr-07 7:13
Matt Newman3-Apr-07 7:13 
AnswerRe: CSS Underlining Pin
Shog93-Apr-07 14:36
sitebuilderShog93-Apr-07 14:36 
GeneralRe: CSS Underlining Pin
Matt Newman3-Apr-07 16:12
Matt Newman3-Apr-07 16:12 
GeneralRe: CSS Underlining Pin
Shog93-Apr-07 16:38
sitebuilderShog93-Apr-07 16:38 
GeneralRe: CSS Underlining Pin
Matt Newman4-Apr-07 7:35
Matt Newman4-Apr-07 7:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.