[Xerte] Calling a function

xerte at lists.nottingham.ac.uk xerte at lists.nottingham.ac.uk
Sun Aug 26 14:17:50 BST 2007


I'm continuing to test this approach to minimizing the current window.

One issue is returning the window to full size after it has moved off
screen.  Depending on the situation, the taskbar button needs to be clicked
2-3 times to restore the window.  It appears that several actions are
occurring.  On the first click of the taskbar button:

1.  The onfocus=reshow() method in the body tag of the html file is moving
the screen back.
2.  Windows XP is minimizing the window.

On the second click, Windows XP maximizes the window.

Is there a more reliable way to minimize the window?  At
https://answers.google.com/answers/main?cmd=threadview&id=20625, the author
explains how to minimize a screen in a Visual Basic environment by calling
the Windows API.  Is there a way to call the Windows API using Visual Basic
or JScript and execute the minimize action from Xerte?

If yes, I am ready to research it.

Thanks.

Jim


-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk]On Behalf Of
xerte at lists.nottingham.ac.uk
Sent: Wednesday, August 22, 2007 3:14 AM
To: xerte at lists.nottingham.ac.uk
Subject: RE: [Xerte] Calling a function


You need to modify rloObject.js and add your functions to the bottom of
it like this:

function myFunction(arg){
  alert('I am a function and my argument is ' + arg);
}

Then you can call the function from Xerte using getURL:

getURL('javascript:myFunction('a test');');

Julian

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of
xerte at lists.nottingham.ac.uk
Sent: 21 August 2007 22:37
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Calling a function

I am trying to minimize the active window from a button.  Although
javascript will not minimize the window, there is a workaround.  The
following code moves the current window off screen.

<script language="javascript">
show=1
function minimize(){
  moveBy(2000,2000)
  show=0
}
function reshow(){
  if(show==0){
    moveBy(-2000,-2000)
    show=1
  }
}
</script>

I plan to add the code onfocus=reshow() to the body tag.  When the focus
is passed back to the window, the code in the body tag will return the
screen to it's original location.

I also need to add code so the button calls the function:  minimize().
I need help here.  How can I call this function in Xerte?

Jim

James Bowman Associates
Customized Quality Management Services

701 Canterbury Drive
Appleton, WI 54915
Phone:  800-731-7488
Fax:  920-731-7193
james at jbassoc.biz
www.jbassoc.biz

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte



More information about the Xerte mailing list