Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Call java inside a java function



Hello,

I'm new to java and have the following problem.

In the example belowe, I need to replace the link through a javascript. The code must execute the function instade of the users click on the a tag.

Html-Head:
<!-- script containing the function called with the a-tag bellowe-->
<script type="text/javascript" src="jquery.DOMWindow.js"></script>


Html-Body:

<A href="http://www.google.com" class="absoluteIframeDOMWindow"></A>

<script type="text/javascript">
$('.absoluteIframeDOMWindow').openDOMWindow({
height:324,
width:545,
positionType:'absolute',
positionTop:150,
eventType:'click',
positionLeft:200,
windowSource:'iframe',
windowPadding:0,
loader:1,
loaderImagePath:'animationProcessing.gif',
loaderHeight:16,
loaderWidth:17
});
</script>

--------------------------

The above example works.

I have a java function called by a flash component. The call of the function is executed correct. But I don't know how to call the function above invoked by the a-tag.

Here my incorrect attempt to solve this:

<script type="text/javascript">


function OpenMonoslideInThickBox()
{
    this.href="http://www.google.com"
 
  $('.absoluteIframeDOMWindow').openDOMWindow({
height:324,
width:545,
positionType:'absolute',
positionTop:150,
eventType:'click',
positionLeft:200,
windowSource:'iframe',
windowPadding:0,
loader:1,
loaderImagePath:'animationProcessing.gif',
loaderHeight:16,
loaderWidth:17
});
}
</script>

Regards

Ralf