I guess that it should be possible to test with innerhtml whether textstring or div id="two" is absent or present.
Then, if one of them is present, I also guess that a javascript code could hide the div id="one".

1- Unfortunately, I made a mistake in my request.
The correct request would have been :
Hide a div <div id="one"> if a string (textstring) or if another div (<div id="two">) is NOT included in the html code of one page of my web site.

Answer to 2 is that you're probably screwed. If you don't have access to the body tag you probably can't add the necessary JavaScript into the <head> or call it appropriately, whether you use pure JavaScript or jQuery.

01-04-2014, 06:10 PM

patrmich

Hi,

Thank you for your prompt reply.

1- I have access to the external .js file where I can add the function code :

2- I have also access to the .tpl (template) file where is located the here below code :
<div id="one">
....
<h4>textstring</h4>
....
<div id="two">
....
</div>
...
</div>

Is there any code that I could add to the .tpl file in order to activate the hide function ?

Thank you very much again.

Patrick

01-05-2014, 01:43 PM

Padonak

you can add this code into your template file (the lower in its content the better)

Code:

<script>
/* this is to save possible already existing onload functions*/
var old_onload=window.onload;
/* this is to set new onload up with executing possible previously set functions */
window.onload=function(){
hide();
old_onload();
}
</script>