logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-01-2014, 08:47 PM   #1
leegun
 
Join Date: Apr 2014
Posts: 5
Default Trouble adding ads

Hi guys
My web designer is MIA so have been trying to figure this out.
I have an ads container but when I replace the words with code or even other words it kills the whole page
I have highlighted the bit of code below. Hope you guys can help
Code:
    function shorten(line, length){
        var parts = Math.round(length / 11);
        size = 2*parts;
        return line.substring(0, size);
    }

    function load_ads(){
        //$(".results").append("<div class='result ads2' style='height: 200px;'></div>");
        $(".results").append("<div class='result ads2' style='height:  200px;'><p>ADS CONTAINER</p></div>");
    }
</script>
</html>
leegun is offline   Reply With Quote
Old 04-02-2014, 04:06 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

The results are defined out side of this. What is the URL?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-02-2014, 06:56 AM   #3
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

this might help https://api.jquery.com/append/
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-02-2014, 07:30 AM   #4
leegun
 
Join Date: Apr 2014
Posts: 5
Default

Quote:
Originally Posted by edbr View Post
The results are defined out side of this. What is the URL?
the URL is http://www.zidify.com and the issue is on the 'search' page, after you have made a search request. You will clearly see the 'ads container' box at the top of the results..

what part should I be looking at?

Last edited by leegun; 04-02-2014 at 07:35 AM..
leegun is offline   Reply With Quote
Old 04-02-2014, 08:52 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

what are you trying to do? you are breaking the code that calls the ads results
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-02-2014, 08:36 PM   #6
leegun
 
Join Date: Apr 2014
Posts: 5
Default

Quote:
Originally Posted by edbr View Post
what are you trying to do? you are breaking the code that calls the ads results

I am trying to find within the whole code, where to put the ads that will appear in that container.
leegun is offline   Reply With Quote
Old 04-05-2014, 02:07 AM   #7
leegun
 
Join Date: Apr 2014
Posts: 5
Default

Quote:
Originally Posted by edbr View Post
what are you trying to do? you are breaking the code that calls the ads results
I really am stumped why I cannot find/change the code that would let be change or even delete this ads container. Any ideas from the source code?
leegun is offline   Reply With Quote
Old 04-05-2014, 04:03 AM   #8
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

on your search page you are calling
Code:
<div class="ads">
	<script type="text/javascript">
  ( function() {
    if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
    var unit = {"publisher":"Zidify","width":300,"height":"auto","sid":"Chitika Default","color_bg":"f2f2f2","nump":"9","fluidH":true};
    var placement_id = window.CHITIKA.units.length;
    window.CHITIKA.units.push(unit);
    document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = '//cdn.chitika.net/getads.js';
    try { document.getElementsByTagName('head')[0].appendChild(s); } catch(e) { document.write(s.outerHTML); }
}());
</script>
	</div>
but this might be part of the deal with chikita, i dont know but that seems to be the engine behind this search
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-05-2014, 04:07 AM   #9
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

if you are trying to use them but substitute your own ads i would be surprised that will happen . you can contact them or sign up for a new account and see what you can do.
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-07-2014, 10:04 PM   #10
leegun
 
Join Date: Apr 2014
Posts: 5
Talking

Quote:
Originally Posted by edbr View Post
on your search page you are calling
Code:
<div class="ads">
    <script type="text/javascript">
  ( function() {
    if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
    var unit = {"publisher":"Zidify","width":300,"height":"auto","sid":"Chitika Default","color_bg":"f2f2f2","nump":"9","fluidH":true};
    var placement_id = window.CHITIKA.units.length;
    window.CHITIKA.units.push(unit);
    document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = '//cdn.chitika.net/getads.js';
    try { document.getElementsByTagName('head')[0].appendChild(s); } catch(e) { document.write(s.outerHTML); }
}());
</script>
    </div>
but this might be part of the deal with chikita, i dont know but that seems to be the engine behind this search

I have 2 ads containers within the php page. I can find the 1st one (the one with the ads code already within it)
the 2nd ads container, I cannot even find where this is created. I would even delete it if I could find it.
(fyi - I didnt write/create the site.)

I really appreciate your help so far
leegun is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com