• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

wgpubs
#1 Posted : Wednesday, August 15, 2007 7:57:34 PM(UTC)
wgpubs

Rank: Member

Joined: 6/11/2007(UTC)
Posts: 12

I'm using the below in a custom master page for a theme I'm developing ... but it ain't pulling the .js file down in IE:

<!--[if lt IE 7.]>
<script defer type="text/javascript" src="./scripts/pngfix.js"></script>
<![endif]-->

Do I need to reference the .js file differently because of the conditional inclusion???

thanks - wayde
Cliff
#2 Posted : Thursday, August 16, 2007 12:49:29 AM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

The issue is probably with the relative path of your script. .Net takes care of the CSS link path in your master page, but not js stuff.

Is your scripts folder in your theme? If so, you can do something like this:
Code:
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="[b]<%# ResolveClientUrl("scripts/pngfix.js") %>[/b]"></script>
<![endif]-->


Then, in your masterpage's code-behind, add this:
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
[b]Me.Page.Header.DataBind()[/b]
End Sub


There are other ways to do this, but this seems to be the easiest so far.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012