Thread: [Phplib-users] Multiple blocks per line
Brought to you by:
nhruby,
richardarcher
|
From: Rob H. <rob...@ws...> - 2002-09-24 18:16:47
|
I have a need to do something like
<a onClick="<!-- BEGIN block1 -->function({param});<!-- END block1 --><!--
BEGIN block2 -->function({param});<!-- END block2 -->return true;">
When I try this, I get "block1" or "block2" is not a valid handle when I try
to set block. Is there a way to do this?
Rob Hutton
Web Safe
www.wsafe.com
|
|
From: Aric C. <gre...@pe...> - 2002-09-24 18:26:42
|
I tried to do something similar to construct URLs. My experimentation
indicated that the block indicators had to be on their own lines or they
wouldnt be parsed.
I ended up doing it on multiple lines, and then simply striping out the line
breaks. Put a block around the whole thing and strip inside that block.
something like this:
<!-- BEGIN anoying -->
<a onClick="
<!-- BEGIN block1 -->
function({param});
<!-- END block1 -->
<!-- BEGIN block2 -->
function({param});
<!-- END block2 -->
return true;">
<!-- END anoying -->
Do your block1 and block2 parsing, then parse anoying and strip the line
breaks from that, and then continue your business...
----- Original Message -----
From: "Rob Hutton" <rob...@ws...>
To: <php...@li...>
Sent: Tuesday, September 24, 2002 11:20 AM
Subject: [Phplib-users] Multiple blocks per line
> I have a need to do something like
>
> <a onClick="<!-- BEGIN block1 -->function({param});<!-- END block1 --><!--
> BEGIN block2 -->function({param});<!-- END block2 -->return true;">
>
> When I try this, I get "block1" or "block2" is not a valid handle when I
try
> to set block. Is there a way to do this?
>
> Rob Hutton
> Web Safe
> www.wsafe.com
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Phplib-users mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phplib-users
>
|
|
From: Rob H. <rob...@ws...> - 2002-09-24 18:41:59
|
Thanks, how do I strip the line breaks? Rob Hutton Web Safe www.wsafe.com > -----Original Message----- > From: Aric Caley [mailto:gre...@pe...] > Sent: Tuesday, September 24, 2002 2:26 PM > To: phpplib; rob...@ws... > Subject: Re: [Phplib-users] Multiple blocks per line > > > I tried to do something similar to construct URLs. My experimentation > indicated that the block indicators had to be on their own lines or they > wouldnt be parsed. > > I ended up doing it on multiple lines, and then simply striping > out the line > breaks. Put a block around the whole thing and strip inside that block. > something like this: > > <!-- BEGIN anoying --> > <a onClick=" > <!-- BEGIN block1 --> > function({param}); > <!-- END block1 --> > <!-- BEGIN block2 --> > function({param}); > <!-- END block2 --> > return true;"> > <!-- END anoying --> > > Do your block1 and block2 parsing, then parse anoying and strip the line > breaks from that, and then continue your business... > > ----- Original Message ----- > From: "Rob Hutton" <rob...@ws...> > To: <php...@li...> > Sent: Tuesday, September 24, 2002 11:20 AM > Subject: [Phplib-users] Multiple blocks per line > > > > I have a need to do something like > > > > <a onClick="<!-- BEGIN block1 -->function({param});<!-- END > block1 --><!-- > > BEGIN block2 -->function({param});<!-- END block2 -->return true;"> > > > > When I try this, I get "block1" or "block2" is not a valid handle when I > try > > to set block. Is there a way to do this? > > > > Rob Hutton > > Web Safe > > www.wsafe.com > > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Phplib-users mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phplib-users > > > > |
|
From: Aric C. <gre...@pe...> - 2002-09-24 18:48:52
|
I'm no regular expression master, but this seems to work:
preg_replace("/\n|\r/","", $template->parse('OUT',"index"));
naturaly replace the parse() as needed...
----- Original Message -----
From: "Rob Hutton" <rob...@ws...>
To: "Aric Caley" <gre...@pe...>; "phpplib"
<php...@li...>
Sent: Tuesday, September 24, 2002 11:45 AM
Subject: RE: [Phplib-users] Multiple blocks per line
> Thanks, how do I strip the line breaks?
>
> Rob Hutton
> Web Safe
> www.wsafe.com
>
> > -----Original Message-----
> > From: Aric Caley [mailto:gre...@pe...]
> > Sent: Tuesday, September 24, 2002 2:26 PM
> > To: phpplib; rob...@ws...
> > Subject: Re: [Phplib-users] Multiple blocks per line
> >
> >
> > I tried to do something similar to construct URLs. My experimentation
> > indicated that the block indicators had to be on their own lines or they
> > wouldnt be parsed.
> >
> > I ended up doing it on multiple lines, and then simply striping
> > out the line
> > breaks. Put a block around the whole thing and strip inside that block.
> > something like this:
> >
> > <!-- BEGIN anoying -->
> > <a onClick="
> > <!-- BEGIN block1 -->
> > function({param});
> > <!-- END block1 -->
> > <!-- BEGIN block2 -->
> > function({param});
> > <!-- END block2 -->
> > return true;">
> > <!-- END anoying -->
> >
> > Do your block1 and block2 parsing, then parse anoying and strip the line
> > breaks from that, and then continue your business...
> >
> > ----- Original Message -----
> > From: "Rob Hutton" <rob...@ws...>
> > To: <php...@li...>
> > Sent: Tuesday, September 24, 2002 11:20 AM
> > Subject: [Phplib-users] Multiple blocks per line
> >
> >
> > > I have a need to do something like
> > >
> > > <a onClick="<!-- BEGIN block1 -->function({param});<!-- END
> > block1 --><!--
> > > BEGIN block2 -->function({param});<!-- END block2 -->return true;">
> > >
> > > When I try this, I get "block1" or "block2" is not a valid handle when
I
> > try
> > > to set block. Is there a way to do this?
> > >
> > > Rob Hutton
> > > Web Safe
> > > www.wsafe.com
> > >
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Phplib-users mailing list
> > > Php...@li...
> > > https://lists.sourceforge.net/lists/listinfo/phplib-users
> > >
> >
> >
>
>
>
|