Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | Thank you! Because today I found this little tool useful |
|