scuzzy47 Posted August 29, 2005 Share Posted August 29, 2005 Hi guys, I'm working on putting the manual inside the WPI program, I've managed to let it open right, but I'm unable to navigate, when I create iframes and I take for example src="purpose.html" it won't find the page, if I test this in regular IE it works fine, any ideas???If I manage to let this work I'll post a tutorial or something... Link to comment Share on other sites More sharing options...
Ghost82 Posted August 29, 2005 Share Posted August 29, 2005 Just out of interest how did you manage to make the manual open inside WPI?? Link to comment Share on other sites More sharing options...
scuzzy47 Posted August 29, 2005 Author Share Posted August 29, 2005 I did this for the Glossy theme, so be sure to change Glossy to whatever name your theme's called.First of all you start changing the WPI.htm, you look for this: <!-- The user manual. --> <div id="ManButton"> <a href="./UserManual/manual.html" target="_blank" onMouseDown="document.ManualButton.src='./themes/Glossy/manual.gif';" onMouseOver="document.ManualButton.src='./themes/Glossy/manualOver.gif'; stm(getText(ttmanual),Style[0]);" onMouseOut="document.ManualButton.src='./themes/Glossy/manual.gif'; htm()"> </b></font> <img src="./themes/Glossy/manual.gif" align="absbottom" class="mainbtn" border="0" name="ManualButton"> <font class="side" ><b><script>document.write(getText(lblmanual));</script> </div>And you change that to this:<!-- The Manual button --> <div id="manualButton"> <a href; onMouseDown="document.optionsbutton.src='./themes/Glossy/continuedown.gif';" onMouseOver="document.optionsbutton.src='./themes/Glossy/continueover.gif'; stm(getText(ttmanual),Style[0]);" onMouseOut="document.optionsbutton.src='./themes/Glossy/continue.gif'; htm();" onClick="ToggleManual();"> <img src="./themes/Glossy/manual.gif" align="absbottom" class="mainbtn" border="0" name="ManualButton"> </img><font class="side"><b><script>document.write(getText(lblmanual));</script></b></font></a><br /> </div>Then you add a layer for the manual you just add the following code (mine is directly under the audio layer): <div id="layermanual" style="position:absolute; display:none; z-index:100; overflow: auto; width: 100%; height: 100%;"> </div>Then you take the next code and save it under manualwizard.js, in the wpiscripts folder.function ToggleManual(){ position="manualwizard.js"; if (document.all.layermanual.style.display == 'none') ShowManual(); else HideManual(); }function WPIPath(){ var p = new String(); p=""; p = unescape(document.location); p = p.substring(0,p.lastIndexOf("/")) + "/"; p = p.replace("file:///","").replace(/\//g,"\\"); return p;}function ShowManual(){ position=".\\wpiscripts\\optionswizard.js"; HideLayers(); document.all.layermanual.style.display = 'block'; CreateManualPage(); var f, fc,s; f = fso.GetFolder(WPIPath() + ".\\themes\\"); fc = new Enumerator(f.SubFolders); s = new String(); for (; !fc.atEnd(); fc.moveNext()) { s = ""; var opt = document.createElement("option"); s += fc.item(); s = s.substr(s.lastIndexOf("\\")+1); opt.value = s; opt.text = s; } }function HideManual(){ position="manualwizard.js"; document.location.reload();}function CreateManualPage(){ position="manualwizard.js"; var tf, strfile; var txt=new String(); txt = ""; var line = new String(); line=""; var ex; strFile = WPIPath() + ".\\themes\\" + theme + "\\manual.htm"; try { tf = fso.OpenTextFile(strFile, 1); line = tf.ReadLine(); while (!tf.AtEndOfStream) { txt += line; line = tf.ReadLine(); } } catch (ex) { } finally { tf.Close(); } document.all.layermanual.innerHTML = txt;}function HideLayers(){ try { for (var i = 0; i<document.all.layergroup.childNodes.length;i++) { var node = document.all.layergroup.childNodes[i]; if (!node.id || node.id.substr(0,5)!="layer") continue; node.style.display='none'; } } catch (de) {}}Next you save this code to Manual.htm in your theme's folder. (The original Manual.htm won't open in WPI.)<html><head><link rel="stylesheet" type="text/css" href="./themes/Glossy/wpi.css" /><link href="wpi.css" rel="stylesheet" type="text/css"></head><body onload="SetScriptWaitTimeout(); startstop(); fillBoxes(); check(load_checks); startstop(); flevInitPersistentLayer('layercfgbtns',0,'','','15','','','15'); setCategoryState();"><tr> <td colspan="2" bgcolor="#18339f" height="10%"><table width="98%"> <tr class="txt"> <td colspan="9"> <center> <p><font size="+2">Windows Post-Install Wizard (WPI) Manual</font></p> </center> <center> </center></td> <tr> <td width="1%"> </td> <td width="14%" class="side"><div align="center">Purpose</div></td> <td width="14%" class="side"><div align="center">User manual</div></td> <td width="14%" class="side"><div align="center">Advanced options</div></td> <td width="14%" class="side"><div align="center">Themes</div></td> <td width="14%" class="side"><div align="center">Tools</div></td> <td width="14%" class="side"><div align="center">Reference</div></td> <td width="14%" class="side"><div align="center">Credits</div></td> <td width="1%"></td> </tr> </table> <table width="98%" border="0"><tr><td height="140"><iframe width="100%" height="100%" src="purpose.htm"></iframe></td></tr> </table></body></html>I've put this in the seperate theme folders because now, you can have a matching manual, for your theme, I hope I didn't forget anything, but if any problems occur, you can always ask here...The only (crucial) problem is to open the links in WPI, because it doesn't seem to support inline frames...maybe the WPI-men can help me out here?Grtz... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now