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  Previous   Next
New HTML Section: goodguy's HEADER_VARS Helper
Author Message
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Since not all users are that familiar with the use of HEADER_VARS, the following little HTML section might be of help to learn more about them. All it does is displaying the source code generated by using the HEADR_VARS tag for the current profile. Of course, you could simply right click on any HTML section and select "View Source", but this is a little easier.

It also demonstrates how you can catch possible syntax errors in the generated script, although they shouldn't happen anymore with DVDProfiler 3.1.

Just create a new HTML Section named HeaderVars and copy the following into it.
Quote:

<HTML>
<!--
  *** goodguy's HEADER_VARS Helper ***
  Copyright (c) 2007 Matthias Wolf, Germany AKA goodguy
-->
<HEAD>
<SCRIPT language=javascript>
// Catch possible syntax error in HEADER_VARS. This *must* be a separate script block.
// Note: Won't do any good if script debugging is enabled.
var g_oErrHV = null;
window.onerror = window_onerrorHV;
function window_onerrorHV(szDesc, szUrl, nLine) {
  g_oErrHV = new Error();
  g_oErrHV.description =
    "Error at line " + nLine + " of '" + szUrl + "':\n" + szDesc;
}
</SCRIPT>
<SCRIPT id=idHeaderVars language=javascript>
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="True" IncludeCrew="True">
</SCRIPT>
<SCRIPT language=javascript>
// Revert to default error handling.
// Again, this *must* be separate from the block containing HEADER_VARS.
window.onerror = null;
</SCRIPT>
<SCRIPT language=javascript>
window.onload = window_onload;
function window_onload() {
  if (g_oErrHV != null) idError.innerText = g_oErrHV.description;
  idOut.innerText = idHeaderVars.innerHTML;
}
</SCRIPT>
</HEAD>
<BODY>
<DIV id=idError></DIV>
<PRE id=idOut></PRE>
</BODY>
</HTML>
Matthias
 Last edited: by goodguy
DVD Profiler Unlimited Registrantxyrano
41215.reg 70320.urk
Registered: March 13, 2007
Sweden Posts: 646
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thank you! Because today I found this little tool useful 
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next