You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Akshay Kapur <ak...@cisco.com> on 2002/09/13 23:55:54 UTC
Javascript Issues with Turbine-Velocity
Hi
I am using a combination of DHTML and Javascript where it is essential for
the Javascript to go between the <head></head> elements (implying the
script gets executed before the body loads)
The structure is as follows -
<html>
<head>
<script language="Javascript" src="script.js">
</script>
<script>
function foo()
{
// Javascript code
}
</script>
</head>
<body>
</body>
</html>
My questions are -
a. As shown in code above, how do I insert the <script> element between the
<head></head>?
b. Also is it possible to specify the "src" attribute on the <script>
element and Javascript code to go between the <script></script> elements?
Basically, I need to!!!
Regards,
Akshay
Re: Javascript Issues with Turbine-Velocity
Posted by Akshay Kapur <ak...@cisco.com>.
Thanks everyone for your help.
Switching the layout to VelcoityOnlyLayout in TR.props worked!
Akshay
At 11:07 AM 9/14/2002 +1000, Scott Eade wrote:
> > From: Akshay Kapur <ak...@cisco.com>
> >
> > Thanks Scott for your response. Please find my comments below -
> >
> > At 08:36 AM 9/14/2002 +1000, you wrote:
> >>> From: Akshay Kapur <ak...@cisco.com>
> >>>
> >>> My questions are -
> >>> a. As shown in code above, how do I insert the <script> element
> between the
> >>> <head></head>?
> >> Just stick the script block anywhere in the body - it will still work.
> >
> > My Javascript code requires that it be placed in between the <head></head>
> > elements otherwise it will not work. The code prints HTML on the fly using
> > DHTML and it's explanation is beyond the scope of this email.
> > I am still searching for solutions ...
>Will it still need to go there if you use innerHTML?
> >
> >
> >>> b. Also is it possible to specify the "src" attribute on the <script>
> >>> element and Javascript code to go between the <script></script> elements?
> >>> Basically, I need to!!!
> >> See the patch to TemplatePageAttributes that I posted to the turbine-dev
> >> mailing list yesterday. You can extend this class and provide the extra
> >> method yourself (just update TR.properties to refer to the new class).
> >
> > Thanks a lot. I will check it out and get back if I have questions.
>You will just want a variation on the setStyle() method (you will be
>implementing the method that I indicated I had not).
>
>
>Cheers,
>
>Scott
>--
>Scott Eade
>Backstage Technologies Pty. Ltd.
>http://www.backstagetech.com.au
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Javascript Issues with Turbine-Velocity
Posted by Scott Eade <se...@backstagetech.com.au>.
> From: Akshay Kapur <ak...@cisco.com>
>
> Thanks Scott for your response. Please find my comments below -
>
> At 08:36 AM 9/14/2002 +1000, you wrote:
>>> From: Akshay Kapur <ak...@cisco.com>
>>>
>>> My questions are -
>>> a. As shown in code above, how do I insert the <script> element between the
>>> <head></head>?
>> Just stick the script block anywhere in the body - it will still work.
>
> My Javascript code requires that it be placed in between the <head></head>
> elements otherwise it will not work. The code prints HTML on the fly using
> DHTML and it's explanation is beyond the scope of this email.
> I am still searching for solutions ...
Will it still need to go there if you use innerHTML?
>
>
>>> b. Also is it possible to specify the "src" attribute on the <script>
>>> element and Javascript code to go between the <script></script> elements?
>>> Basically, I need to!!!
>> See the patch to TemplatePageAttributes that I posted to the turbine-dev
>> mailing list yesterday. You can extend this class and provide the extra
>> method yourself (just update TR.properties to refer to the new class).
>
> Thanks a lot. I will check it out and get back if I have questions.
You will just want a variation on the setStyle() method (you will be
implementing the method that I indicated I had not).
Cheers,
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Javascript Issues with Turbine-Velocity
Posted by Akshay Kapur <ak...@cisco.com>.
Thanks Scott for your response. Please find my comments below -
At 08:36 AM 9/14/2002 +1000, you wrote:
> > From: Akshay Kapur <ak...@cisco.com>
> >
> > My questions are -
> > a. As shown in code above, how do I insert the <script> element between the
> > <head></head>?
>Just stick the script block anywhere in the body - it will still work.
My Javascript code requires that it be placed in between the <head></head>
elements otherwise it will not work. The code prints HTML on the fly using
DHTML and it's explanation is beyond the scope of this email.
I am still searching for solutions ...
> > b. Also is it possible to specify the "src" attribute on the <script>
> > element and Javascript code to go between the <script></script> elements?
> > Basically, I need to!!!
>See the patch to TemplatePageAttributes that I posted to the turbine-dev
>mailing list yesterday. You can extend this class and provide the extra
>method yourself (just update TR.properties to refer to the new class).
Thanks a lot. I will check it out and get back if I have questions.
> >
> > Regards,
> > Akshay
>
>Cheers,
>
>Scott
>--
>Scott Eade
>Backstage Technologies Pty. Ltd.
>http://www.backstagetech.com.au
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Javascript Issues with Turbine-Velocity
Posted by Scott Eade <se...@backstagetech.com.au>.
> From: Akshay Kapur <ak...@cisco.com>
>
> My questions are -
> a. As shown in code above, how do I insert the <script> element between the
> <head></head>?
Just stick the script block anywhere in the body - it will still work.
> b. Also is it possible to specify the "src" attribute on the <script>
> element and Javascript code to go between the <script></script> elements?
> Basically, I need to!!!
See the patch to TemplatePageAttributes that I posted to the turbine-dev
mailing list yesterday. You can extend this class and provide the extra
method yourself (just update TR.properties to refer to the new class).
>
> Regards,
> Akshay
Cheers,
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>