You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Dutertry, Nicolas" <Ni...@HRACCESS.com> on 2007/02/26 17:20:27 UTC

Portlet containing a javascript function and Jetspeed Desktop

Hi,
 
I'm trying to use the jetspeed desktop with a very simple portlet returning
the following HTML :
 
<script>
<!--
function test() {
    alert("hello");
}
-->
</script>
<a href="javascript:test()">test</a>
 
It works with Firefox, but it doen't work with Internet Explorer. When I
click the test link, I receive a javascript error as if the function test()
was not defined.
 
A few month ago, I tried to load html containing javascript functions with
ajax, but I didn't manage to make it work with internet explorer.
Does anyone have a solution for this issue ?
 
--
Nicolas Dutertry

Re: Portlet containing a javascript function and Jetspeed Desktop

Posted by Enrique Perez <pe...@dit.upm.es>.
Hi Nicolas,

I don't know much about Javascript, but I've tested this code on a IE 
browser and the alert has display (I've used an html page instead of a 
portlet, but i think it should work):

    <script type="text/javascript">

        function test() {
            alert("hello");
        }

    </script>
    <a href="javascript:test()">test</a>

I suggest you define the type for the script... =)

Regards.


Dutertry, Nicolas escribió:
> Hi,
>  
> I'm trying to use the jetspeed desktop with a very simple portlet returning
> the following HTML :
>  
> <script>
> <!--
> function test() {
>     alert("hello");
> }
> -->
> </script>
> <a href="javascript:test()">test</a>
>  
> It works with Firefox, but it doen't work with Internet Explorer. When I
> click the test link, I receive a javascript error as if the function test()
> was not defined.
>  
> A few month ago, I tried to load html containing javascript functions with
> ajax, but I didn't manage to make it work with internet explorer.
> Does anyone have a solution for this issue ?
>  
> --
> Nicolas Dutertry
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org