You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gary Nielson <gn...@charlotte.infi.net> on 2001/06/09 20:01:00 UTC

Problem getting a javascript to load

Hi, 

I am having difficulty getting a javascript to load using Embperl-1.3.2
under Redhat 5.2 and perl 5.004_04, loading pages through epocgi.pl.

At the bottom of base.epl, I place this:

<SCRIPT
LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT>

which calls a javascript file which calls several other files:

HM_Arrays.js
HM_ScriptDOM.js
HM_ScriptIE4.js
HM_ScriptNS4.js

It just plain won't load on the page. Outside of embperl, the script loads
just fine. It's a dynamic navigation menu script.

What am I doing wrong? How can I get this to run? Any help
appreciated. 

Thanks.
Gary


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Why does some code work in base.epl and not under Execute?

Posted by Gary Nielson <gn...@charlotte.infi.net>.
Thank you. That worked. 

On 12 Jun 2001, Chris Strom wrote:

> Gary Nielson <gn...@charlotte.infi.net> writes:
> 
> > Hi,
> > 
> > I am just trying to figure out why the following code works when included
> > in base.epl, but not when called with Execute from another .epl file (as
> > in [- Execute ('picture.epl') -]:
> 
> As written, this won't work because $html is not defined in the picture.epl
> template.  You would have to pass it as a parameter in the Execute
> statement:
> 
> [- Execute('picture.epl', $html) -]
> 
> Then, in picture.epl read that parameter in:
> 
> [- ($html) = @param; -]
> 
> If you're using EmbperlObject, you can also use the $req variable to store
> data that's passed between templates.
> 
> > 
> > [$ if ($html =~ /Lower/i ) $]
> > <img
> > src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> > 
> > [$ if ($html =~ /Middle/i ) $] 
> > <img
> > src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> > 
> > [$ if ($html =~ /Upper/i ) $]
> > <img
> > src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
> > [$ endif $]
> > 
> > [$ if ($html !~ /Lower|Middle|Upper/i ) $]
> > <IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
> > [$ endif $]
> > 
> > When called with Execute, the code runs the last if statement.
> > 
> > Any help appreciated.
> > 
> > Gary
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> 

-- 
Gary Nielson
gary@garynielson.com





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Why does some code work in base.epl and not under Execute?

Posted by Chris Strom <cs...@cos.com>.
Gary Nielson <gn...@charlotte.infi.net> writes:

> Hi,
> 
> I am just trying to figure out why the following code works when included
> in base.epl, but not when called with Execute from another .epl file (as
> in [- Execute ('picture.epl') -]:

As written, this won't work because $html is not defined in the picture.epl
template.  You would have to pass it as a parameter in the Execute
statement:

[- Execute('picture.epl', $html) -]

Then, in picture.epl read that parameter in:

[- ($html) = @param; -]

If you're using EmbperlObject, you can also use the $req variable to store
data that's passed between templates.

> 
> [$ if ($html =~ /Lower/i ) $]
> <img
> src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html =~ /Middle/i ) $] 
> <img
> src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html =~ /Upper/i ) $]
> <img
> src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html !~ /Lower|Middle|Upper/i ) $]
> <IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
> [$ endif $]
> 
> When called with Execute, the code runs the last if statement.
> 
> Any help appreciated.
> 
> Gary
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Why does some code work in base.epl and not under Execute?

Posted by Gary Nielson <gn...@charlotte.infi.net>.
Hi,

I am just trying to figure out why the following code works when included
in base.epl, but not when called with Execute from another .epl file (as
in [- Execute ('picture.epl') -]:

[$ if ($html =~ /Lower/i ) $]
<img
src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
[$ endif $]

[$ if ($html =~ /Middle/i ) $] 
<img
src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
[$ endif $]

[$ if ($html =~ /Upper/i ) $]
<img
src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
[$ endif $]

[$ if ($html !~ /Lower|Middle|Upper/i ) $]
<IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
[$ endif $]

When called with Execute, the code runs the last if statement.

Any help appreciated.

Gary


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem getting a javascript to load

Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I am having difficulty getting a javascript to load using Embperl-1.3.2
> under Redhat 5.2 and perl 5.004_04, loading pages through epocgi.pl.
>
>...
> It just plain won't load on the page. Outside of embperl, the script loads
> just fine. It's a dynamic navigation menu script.
>

I don't think that this related to Embperl. Maybe you have different paths
with and without Embperl and the js files are not found when running under
Embperl. The other thing is that you should make sure that your js files are
not handled by EmbperlObject / epocgi, because when this happens they become
included in your base template so the browser doesn't recognice them as
javescript anymore

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Page loading stalls under Netscape 4.72 for Linux

Posted by Gary Nielson <gn...@charlotte.infi.net>.
Thanks. I upgraded to 1.3.3 and found that my other problem I emailed the
list about -- not being able to load a javascript under epocgi -- went
away as well. Everything is working fine now.

On Sun, 10 Jun 2001, Gerald Richter wrote:

> 
> 
> Hi,
> >
> > I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
> > have running under epocgi.pl do not fully load. They stall out at about
> > 99% loading and I have to hit the Stop button to stop the load
> > process.
> 
> Fixed in 1.3.3
> 
> Gerald
> 
> 
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------
> 
> 

-- 
Gary Nielson
gary@garynielson.com





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Page loading stalls under Netscape 4.72 for Linux

Posted by Gerald Richter <ri...@ecos.de>.

Hi,
>
> I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
> have running under epocgi.pl do not fully load. They stall out at about
> 99% loading and I have to hit the Stop button to stop the load
> process.

Fixed in 1.3.3

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Page loading stalls under Netscape 4.72 for Linux

Posted by Gary Nielson <gn...@charlotte.infi.net>.
Hi,

I am noticing -- so far only under Netscape 4.72 for Linux -- that pages I
have running under epocgi.pl do not fully load. They stall out at about
99% loading and I have to hit the Stop button to stop the load
process. The page never completely loads, with a "Transfer
Interrupted!" statement at the bottom of the page. I haven't noticed this
under Windows, either with IE or Netscape. Does anyone know what would
cause this and if it is either a bug in the browser or a misconfiguration
of embperl on my part that needs correcting? If it's a browser bug, it's
no big deal, most of my users use Windows browsers. If it's something I
can correct on my end, though, what do I need to do? Any help appreciated.

Gary


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org