You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Parm Lehal <pa...@gmail.com> on 2012/09/28 13:22:36 UTC

Ofbiz javascript behaves strangely with AJP

I copied tried example ofbiz website within Ofbiz with and without AJP
(port 8009). Everything else works properly except that javascript
scripts for showing slides on the home page do not work with AJP.

I get following errors:


Error: Prototype is not defined
Source File: http://localhost/xxxx/script/effects.js
Line: 73

Error: $w is not defined
Source File: http://localhost/xxxx/script/search.js
Line: 34

Error: Class is not defined
Source File: http://localhost/xxxx/script/slides.js
Line: 20

Error: document.observe is not a function
Source File: http://localhost/xxxx/#
Line: 104

Everything works just fine on port 8080 and 8443........ What may be
wrong here? Please, advise.

Re: Ofbiz javascript behaves strangely with AJP

Posted by Brajesh Patel <br...@gmail.com>.
Hi Parm,

js loading hierarchy is not correct or you are not loading prototype.js
file.


On Fri, Sep 28, 2012 at 5:07 PM, Rajbir Saini <ra...@yahoo.com> wrote:

> It looks your JS is not loaded properly. Check page source and see if
> files are loaded.
>
> Thanks,
>
> Raj
>
>
> On Friday 28 September 2012 04:52 PM, Parm Lehal wrote:
>
>> I copied tried example ofbiz website within Ofbiz with and without AJP
>> (port 8009). Everything else works properly except that javascript
>> scripts for showing slides on the home page do not work with AJP.
>>
>> I get following errors:
>>
>>
>> Error: Prototype is not defined
>> Source File: http://localhost/xxxx/script/**effects.js<http://localhost/xxxx/script/effects.js>
>> Line: 73
>>
>> Error: $w is not defined
>> Source File: http://localhost/xxxx/script/**search.js<http://localhost/xxxx/script/search.js>
>> Line: 34
>>
>> Error: Class is not defined
>> Source File: http://localhost/xxxx/script/**slides.js<http://localhost/xxxx/script/slides.js>
>> Line: 20
>>
>> Error: document.observe is not a function
>> Source File: http://localhost/xxxx/#
>> Line: 104
>>
>> Everything works just fine on port 8080 and 8443........ What may be
>> wrong here? Please, advise.
>>
>>
>


-- 
Thanks
Brajesh Patel
Salmonllc.com
http://bigfish.salmonllc.com/bfDemo.html

skype: brajesh.patel11
Cell:- +91 8750709907

Re: Ofbiz javascript behaves strangely with AJP

Posted by Parm Lehal <pa...@gmail.com>.
Thanks Brajesh and Rajbir,

Problem was that I was only forwarding one app from Ofbiz via AJP and
prototype.js and some other files are server from images app in Ofbiz
framework so I needed to forward that too in proxy configuration.



On 9/28/12, Parm Lehal <pa...@gmail.com> wrote:
> The files are loaded...that's why it is pointing to the error in the
> javascript files with line numbers......... Is there anything else which
> needs to be loaded other than three scripts in the script folder?
>
> On Fri, Sep 28, 2012 at 4:37 AM, Rajbir Saini <ra...@yahoo.com> wrote:
>
>> It looks your JS is not loaded properly. Check page source and see if
>> files are loaded.
>>
>> Thanks,
>>
>> Raj
>>
>>
>> On Friday 28 September 2012 04:52 PM, Parm Lehal wrote:
>>
>>> I copied tried example ofbiz website within Ofbiz with and without AJP
>>> (port 8009). Everything else works properly except that javascript
>>> scripts for showing slides on the home page do not work with AJP.
>>>
>>> I get following errors:
>>>
>>>
>>> Error: Prototype is not defined
>>> Source File:
>>> http://localhost/xxxx/script/**effects.js<http://localhost/xxxx/script/effects.js>
>>> Line: 73
>>>
>>> Error: $w is not defined
>>> Source File:
>>> http://localhost/xxxx/script/**search.js<http://localhost/xxxx/script/search.js>
>>> Line: 34
>>>
>>> Error: Class is not defined
>>> Source File:
>>> http://localhost/xxxx/script/**slides.js<http://localhost/xxxx/script/slides.js>
>>> Line: 20
>>>
>>> Error: document.observe is not a function
>>> Source File: http://localhost/xxxx/#
>>> Line: 104
>>>
>>> Everything works just fine on port 8080 and 8443........ What may be
>>> wrong here? Please, advise.
>>>
>>>
>>
>

Re: Ofbiz javascript behaves strangely with AJP

Posted by Parm Lehal <pa...@gmail.com>.
The files are loaded...that's why it is pointing to the error in the
javascript files with line numbers......... Is there anything else which
needs to be loaded other than three scripts in the script folder?

On Fri, Sep 28, 2012 at 4:37 AM, Rajbir Saini <ra...@yahoo.com> wrote:

> It looks your JS is not loaded properly. Check page source and see if
> files are loaded.
>
> Thanks,
>
> Raj
>
>
> On Friday 28 September 2012 04:52 PM, Parm Lehal wrote:
>
>> I copied tried example ofbiz website within Ofbiz with and without AJP
>> (port 8009). Everything else works properly except that javascript
>> scripts for showing slides on the home page do not work with AJP.
>>
>> I get following errors:
>>
>>
>> Error: Prototype is not defined
>> Source File: http://localhost/xxxx/script/**effects.js<http://localhost/xxxx/script/effects.js>
>> Line: 73
>>
>> Error: $w is not defined
>> Source File: http://localhost/xxxx/script/**search.js<http://localhost/xxxx/script/search.js>
>> Line: 34
>>
>> Error: Class is not defined
>> Source File: http://localhost/xxxx/script/**slides.js<http://localhost/xxxx/script/slides.js>
>> Line: 20
>>
>> Error: document.observe is not a function
>> Source File: http://localhost/xxxx/#
>> Line: 104
>>
>> Everything works just fine on port 8080 and 8443........ What may be
>> wrong here? Please, advise.
>>
>>
>

Re: Ofbiz javascript behaves strangely with AJP

Posted by Rajbir Saini <ra...@yahoo.com>.
It looks your JS is not loaded properly. Check page source and see if 
files are loaded.

Thanks,

Raj

On Friday 28 September 2012 04:52 PM, Parm Lehal wrote:
> I copied tried example ofbiz website within Ofbiz with and without AJP
> (port 8009). Everything else works properly except that javascript
> scripts for showing slides on the home page do not work with AJP.
>
> I get following errors:
>
>
> Error: Prototype is not defined
> Source File: http://localhost/xxxx/script/effects.js
> Line: 73
>
> Error: $w is not defined
> Source File: http://localhost/xxxx/script/search.js
> Line: 34
>
> Error: Class is not defined
> Source File: http://localhost/xxxx/script/slides.js
> Line: 20
>
> Error: document.observe is not a function
> Source File: http://localhost/xxxx/#
> Line: 104
>
> Everything works just fine on port 8080 and 8443........ What may be
> wrong here? Please, advise.
>