Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2  Previous   Next
Creating layouts is not easy, when...
Author Message
DVD Profiler Unlimited RegistrantMark Harrison
I like IMDB
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 3,321
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting dvdoug:
Quote:
Unless your target audience includes people using Netscape 1 or IE2 I wouldn't bother with the <!-- and //-->. For HTML windows, the target audience is exclusively IE6/IE7.


Excellent point.  But in my defense, I simply copied the script block Ken had higher up in the page.
Get the CSVExport and Database Query plug-ins here.
Create fake parent profiles to organize your collection.
DVD Profiler Unlimited Registrantdvdoug
As seen on Slashdot...
Registered: March 13, 2007
Posts: 55
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Marc and Mark - 
Doug

DougWeb.org - my personal site.
TWSNBN.com
Unofficial DVD Profiler Resource Centre - serving hundreds of users every month!
DVD Profiler Wiki
DVD Profiler Desktop and Mobile RegistrantStar ContributorRander
I hate mondays...
Registered: March 13, 2007
Denmark Posts: 668
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I've googled for this, but can't find the answer...

I need to reference an image in JavaScript. Unfortunately, the link (obviously) contains backslashes, which need to be escaped in JavaScript. So I have done this:

var Image = "$DPIMAGES.image.gif";
Image = Image.replace("\\","\\\\");

But Image ends up containing just "file://C:Documents and SettingsRanderApplication DataDVD ProfilerTempDesignImage.gif" - all the backslashes have gone...

What to do? 
The future is here. It's just not widely distributed yet. (William Gibson)
DVD Profiler Unlimited Registrantdvdoug
As seen on Slashdot...
Registered: March 13, 2007
Posts: 55
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting Rander:
Quote:
I've googled for this, but can't find the answer...

I need to reference an image in JavaScript. Unfortunately, the link (obviously) contains backslashes, which need to be escaped in JavaScript. So I have done this:

var Image = "$DPIMAGES.image.gif";
Image = Image.replace("\\","\\\\");

But Image ends up containing just "file://C:Documents and SettingsRanderApplication DataDVD ProfilerTempDesignImage.gif" - all the backslashes have gone...

What to do? 


The backslashes need to be escaped before they become part of the javascript string - in the code you gave, the backslashes are removed by the JScript engine as it parses the first line of your script. Consequently, the second line isn't actually doing anything at all.

I haven't played around with v3 much yet, so there might be a variable in HEADER_VARS that you can use (if not, then please add it Ken!). Otherwise you'll need to do something like this (untested).

<img src="$DPIMAGES.image.gif" id="myImage" />

<script type="text/javascript">
var Image = document.getElementById("myImage"); //reference to <IMG> element
var ImagePath = Image.getAttribute("src"); //the path to the image - which will be automatically escaped
</script>
Doug

DougWeb.org - my personal site.
TWSNBN.com
Unofficial DVD Profiler Resource Centre - serving hundreds of users every month!
DVD Profiler Wiki
 Last edited: by dvdoug
DVD Profiler Unlimited Registrantmithirandir
A DVD wizard
Registered: March 13, 2007
Germany Posts: 96
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting dvdoug:
Quote:

I haven't played around with v3 much yet, so there might be a variable in HEADER_VARS that you can use (if not, then please add it Ken!). Otherwise you'll need to do something like this (untested).


As I had a similar problem, Ken added the following variables into the header section, which work fine for me. 

Quoting Ken Cole:
Quote:
3.0.1 has the following new variables generated for the DP_HEADER_VARS tags:
DP_ProgramLayoutName
DP_ProgramDatabaseName
DP_ProgramPathDatabase
DP_ProgramPathImages
DP_ProgramPathThumbnails
DP_ProgramPathLayouts
DP_ProgramPathReports
DP_ProgramPathTemp
DP_ProgramPathProgram

Additionally, I've doubled the \ chars in the paths.
Best regards,

Mithirandir

http://www.dvd-live.de

Download Mithirandir's Skin v1.54  from
here!

Description / ReadMe's on Page 66!
DVD Profiler Unlimited Registrantifbi98
Registered: May 15, 2007
Posts: 7
Posted:
PM this userDirect link to this postReply with quote
Sorry for this empty post. I used the wong thread and this is the reason why I deleted the post
 Last edited: by ifbi98
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2  Previous   Next