eZ Community » Forums » Developer » custom Javascript location?
expandshrink

custom Javascript location?

custom Javascript location?

Wednesday 05 January 2011 12:47:31 pm - 5 replies

Hi everyone!

i'm handling an ezpublish website, which has a custom factbox with a template. Inside the custom template code there are function calls to a Javascript, but i'm not able to find the location of this file. I need to find it to edit the functions them-self, but the previous developer is not available actually.

Do you have any suggestions about how locate this Javascript file? the "find *.js" didn't find anything!

Best regards

Daniele

Wednesday 05 January 2011 1:04:15 pm

if you're sure it's a javascript call and not a template operator call, find it the browser source code and check pagelayout template or the template including the factbox..or do a search by the javascript function..or the js is in an external source..

Modified on Wednesday 05 January 2011 1:08:27 pm by andre müller

Wednesday 05 January 2011 2:24:35 pm

if you're sure it's a javascript call and not a template operator call, find it the browser source code and check pagelayout template or the template including the factbox..or do a search by the javascript function..or the js is in an external source..

the template of the factbox has this piece of code about Javascript call:

{*?template charset=utf-8?*}

 

 

<div class="factbox object-{if is_set($align)}{$align}{else}left{/if}">

 

<div class="border-box factbox-header">

 

<div class="border-tl"><div class="border-tr"><div class="border-tc"></div></div></div>

 

<div class="border-ml"><div class="border-mr"><div class="border-mc">

 

<div class="box-content">

 

 

<h2>{if is_set($title)}{$title}{/if} </h2>

 

 

</div>

 

</div></div></div>

 

</div>

 

<div class="border-box factbox-content">

 

<div class="border-ml"><div class="border-mr"><div class="border-mc">

 

<div class="box-content">

 

 

{$content}

 

 

<form name="mutuo" method="post" action="">

 

 

<p style="margin-left: 5px;">

 

<label>Somma da assicurare</label>

 

<input type="text" maxlength="7" onfocus="javascript:ripristina(this);" value="" class="login"/>

 

<label>Durata del mutuo</label>

 

<input type="text" size="5" maxlength="2" id="anni_banca" name="anni_banca" value="" class="login"/>

 

<a class="btt_entra" href="javascript: calcola_mutuo_banca();" style="position: absolute; margin-top: 2px; margin-left: 20px;">CALCOLA</a>

 

</p>

 

<div>

 

</div>

 

<div>

 

</div>

 

</form>

 

 

</div>

 

</div></div></div>

 

<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>

 

</div>

 

</div>

Thus, the function name looks to be "calcola_mutuo_banca()", but i'm still not able to locate the source! :/ :/

Modified on Wednesday 05 January 2011 2:27:25 pm by Daniele Conci

Wednesday 05 January 2011 2:40:25 pm

Hi Daniele,

You can do a search in files to see where "calcola_mutuo_banca" is mentioned.

The easiest way to do it is through shell with the following command

find . -exec grep -H -n 'calcola_mutuo_banca' {} \;

It should list every file where the text is mentioned, hopefully one of them is your .js

Wednesday 05 January 2011 3:06:55 pm

Hi Daniele,

You can do a search in files to see where "calcola_mutuo_banca" is mentioned.

The easiest way to do it is through shell with the following command

find . -exec grep -H -n 'calcola_mutuo_banca' {} \;

It should list every file where the text is mentioned, hopefully one of them is your .js

awesome Edi, i found it!!!

Thanks again!

solved!

Thursday 06 January 2011 7:57:36 pm

Glad I could help you happy.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from