Support Forums

Old 02-24-2009, 10:59 AM   #1
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default using javascript on homepage

Hi Guys,

I'm using a javascript which enables pngs to show properly in ie6, and it does, but only after pressing refresh.

I'm wondering if I've code it properly with the literal tags and also, on another page, php echo tags:

smarty

{literal}
<script type='text/javascript'>

$(document).ready(function(){
$(document).pngFix();
});

</script>
{/literal}

php

<?php
echo "<script type='text/javascript'>";
echo "$(document).ready(function(){";
echo "$(document).pngFix();";
echo "}); ";
echo "</script>";
?>
DGiscombe is offline   Reply With Quote
Old 02-24-2009, 11:13 AM   #2
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default

Sorry, just saw the FAQ on templates, so I was doing the literal tags right.
DGiscombe is offline   Reply With Quote
Old 02-24-2009, 11:16 AM   #3
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,776
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

From what you posted everything looks correct. I have no idea why it wouldn't be working.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 02-24-2009, 11:17 AM   #4
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

It may help to know what template and where in the template you placed this.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 02-24-2009, 11:23 AM   #5
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default

used the smarty one in the layout.tpl just above the close header tag:

{literal}
<script type='text/javascript'>

$(document).ready(function(){
$(document).pngFix();
});

</script>
{/literal}
{$header}
{modulehook function="tpl_layout_head" options=""}
</head>
DGiscombe is offline   Reply With Quote
Old 02-24-2009, 11:28 AM   #6
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Where is the pngfix function comming from? Are you loading it in the head of the document?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 02-24-2009, 11:34 AM   #7
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default

just above it in the header:

<script type="text/javascript" src="javascript/jquery/jquery.pngFix.js"></script>
DGiscombe is offline   Reply With Quote
Old 02-24-2009, 11:35 AM   #8
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Can you supply a link to yoru site?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 02-24-2009, 12:01 PM   #9
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default

i used this intead:

$(function(){$('div.logo').pngFix();});

Last edited by DGiscombe; 04-13-2009 at 09:30 AM.
DGiscombe is offline   Reply With Quote

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I add javascript to my site? Plamen v4 Questions & Support 2 09-03-2008 11:31 AM
Javascript question canariasdata v4 Questions & Support 7 06-17-2008 10:38 AM
Javascript - HELP!! objelland v3.1 Questions & Support 18 03-31-2008 06:55 AM
Javascript Problem pschievink v3.1 Questions & Support 4 08-28-2007 07:14 AM


All times are GMT -4. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0