Jump to content

Adding a WPI User Manual button


Recommended Posts

Main credit on this goes to blinkdt, this is his method i just altered it alittle

first off create a manual.html of your choice design or what ever

add these lines to the end of your manual.html page for a close button if you like,, its user choice if you want it

<br><br>

<center>

<form method="post">

<input type="button" value="Close Window"

onclick="window.close()">

</form>

</center>

now in your themes using your wpi.htm youll have to edit it like this

in the head tags add this

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

  if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

</script>

then at the bottom to add the user manual buttons in your wpi.htm youll add this to the end so it looks like this

    <td align="right">

   

 

   

    <!-- The user manual. -->

<a href="./UserManual/manual.html" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('UserManual','','./UserManual/graphics/manualOver.gif',0)" onClick="window.open('./UserManual/manual.html','mywindow','width=700,height=400,left=0,top=100,screenX=0,screenY=100,scrollbars=yes,toolbar=no,directories=

no,location=no,status=no,menubar=no,resizable=no,'); return false"><font class="side"><b>User Manual</b></font> <img src="./UserManual/graphics/manual.gif" alt="User Manual" name="UserManual" width="32" height="32" border="0" align="absmiddle"></a>

    </td>

  </tr>

  </table>

    </td>

</tr>

</table>

</body>

</html>

your end result will look like this

notice the user manual has removed functions at the top,, its smoother function, and has a close button now,, this way you can resize it to any window you desire and also position place when it opens.

hope this helps some one.

also make sure you put the right addy for te calling of your manual, so that it knows where to get it from..

Edited by Lost Soul
Link to comment
Share on other sites


from \WPI\Themes\Default folder , in wpi.htm file , edited with notepad.exe , i delete only

     target="_blank"
     onMouseOut="MM_swapImgRestore()"
     onMouseOver="MM_swapImage('UserManual','','./themes/Default/manualOver.gif',0)">
     <font class="side"><b>User Manual</b></font> <img src="./themes/Default/manual.gif" alt="User Manual" name="UserManual" width="32" height="32" border="0" align="absmiddle"></a>

lines

no error till now and i hope will not be .

Link to comment
Share on other sites

@ oneless

Looks right, but ensure that you remove the entire reference to the tag:

<a href="./UserManual/manual.html" target="_blank" ... ... ></a>

Everything between and including the "a" tag should be deleted. :yes:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...