Put your action here:
} else {
$content .= get_content("$template", $HTML);
}
+
+ $HTML->{ACTION} = $action;
+
print $content;
}
You COULD be putting it inside a if statement, which may be ingnored.
Putting it JUST above the print $content;
would put it outside of EVERY if statement.
Try that, then post back the result. If you already have it there, then also
post back, I'll look at it AGAIN.
Richard
http://www.firstratehosting.com
http://register.firstratehosting.com
"Your Host With the Most!"
----- Original Message -----
From: "Charles Daminato" <[EMAIL PROTECTED]>
To: "Paul Chvostek" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, May 27, 2002 2:34 PM
Subject: RE: passing $action to %HTML in manage.cgi
> Er ... uh... then I don't know. My understanding is base.html is ignored,
> of course my understanding could very well be false and misleading *heh*
>
> Charles Daminato
> OpenSRS Product Manager
> Tucows Inc. - [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Paul Chvostek [mailto:[EMAIL PROTECTED]]
> > Sent: May 27, 2002 3:19 PM
> > To: Charles Daminato
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: passing $action to %HTML in manage.cgi
> >
> >
> >
> > But Chuck...
> >
> > The idea is to have the javascript: link include the current $action.
> >
> > If print_form simply does a "$HTML->{ACTION} = $action;" some time
> > before get_content is called, then {{ACTION}} inside *ANY* template
> > file should be rewritten according to the value of the global variable
> > $action, shouldn't it? The get_content function doesn't discriminate.
> >
> > p
> >
> > On Mon, May 27, 2002 at 02:55:11PM -0400, Charles Daminato wrote:
> > >
> > > I believe the print_form doesn't do anything significant with
> > base.html, and
> > > if that's where you have the {{ACTION}} piece then it won't get
> > parsed and
> > > changed (I believe)
> > >
> > > Charles Daminato
> > > OpenSRS Product Manager
> > > Tucows Inc. - [EMAIL PROTECTED]
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
> > > > Behalf Of Paul Chvostek
> > > > Sent: May 27, 2002 2:43 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: passing $action to %HTML in manage.cgi
> > > >
> > > >
> > > >
> > > > I'm trying to add context sensitive help to manage.cgi, to go
> > along with
> > > > a number of other UI modifications I've made.
> > > >
> > > > The changes I've done include stuff added to
> > templates/manage/base.html;
> > > >
> > > > <script language="JavaScript">
> > > > function popuphelp(item) {
> > > > var helpwindow=window.open("/admin/popuphelp.php?item=" +
> > > > item,"help","width=400,height=400,scrollbars=yes,dependent=yes");
> > > > }
> > > > </script>
> > > > ... ... ...
> > > > <tr>
> > > > <td><table width="100%" border=0 cellspacing=0 cellpadding=0><tr>
> > > > <td align=left bgcolor=d0d0d0 nowrap><font face="verdana,
> > > > arial" size=1> {{TOP_NAVBAR}}</font></td>
> > > > <td align=right bgcolor=d0d0d0><a
> > > > href="javascript:popuphelp('osrs/{{ACTION}}')">Help</a> </td>
> > > > </tr></table></td>
> > > > </tr>
> > > >
> > > > along with some changes to manage.cgi which are *supposed* to
popupate
> > > > $HTML{ACTION} with the value of $action. But somewhere the variable
> > > > content is getting lost, and I'm sure I'm missing something obvious.
> > > > I have added:
> > > >
> > > > $HTML->{ACTION} = $action;
> > > >
> > > > to manage.cgi's sub print_form. The idea is that the content of the
> > > > javascript popuphelp call will be populated by whatever
> > section we happen
> > > > to be in, allowing the help to be customized for the $action in
play.
> > > >
> > > > I was thinking that since $action is defined globally, it should be
> > > > available inside print_form. What am I doing wrong? Am I missing
> > > > something critical about the way %HTML is supposed to work?
> > > >
> > > > This stuff lives at http://www.it.ca/domain/manage.cgi in case
anyone
> > > > wants to take a look from the user's perspective.
> > > >
> > > > Thanks. :)
> > > >
> > > > --
> > > > Paul Chvostek
> > <[EMAIL PROTECTED]>
> > > > Operations / Development / Abuse / Whatever vox: +1
> > 416 598-0000
> > > > it.canada
> http://www.it.ca/
> > >
>
> --
> Paul Chvostek <[EMAIL PROTECTED]>
> Operations / Development / Abuse / Whatever vox: +1 416 598-0000
> it.canada http://www.it.ca/
>
>
>