cancel
Showing results for 
Search instead for 
Did you mean: 

Call a function from a href in my irpt page

Former Member
0 Kudos

I have an irpt that has three rows to a table. The middle row is my iFrame. The bottom row contains my hyperlink menu selections. I would like to take my mouse over the particular word and do a hyperlink that calls a function to load the iframe with the irpt and its params. How can I call a function using a href?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

<a href="javascript:myJavascriptFunction(myAttributes);">MyClickableWord</a>

The myJavascriptFunction() will need to exist on the page or called from the page using the <script src=""></script>

Message was edited by:

Ryan Miller

Former Member
0 Kudos

What is wrong with this?

<br>

<br>

function iFrame(X) <br>

{<br>

var strUrl = "../Administrators/xMII_Projects.irpt?Product=" + X;<br>

document.ifrReport.window.location.href = strUrl;<br>

}<br>

<br>

<br>

<td class=normalBackground nowrap><br>

div class=internalBottomButtonOpenRight><br>

a class='stylLink' href="javascript:iFrame(Cored Wire);">Cored Wire /a<br>

/div<br>

</td><br>

<td class=normalBackground nowrap><br>

div class=internalBottomButtonOpenRight><br>

a class='stylLink' href="javascript:iFrame(Filler Rod);">Filler Rod /a<br>

/div<br>

</td><br>

I purposedly removed the (<>) around 'a' and 'div' inorder for me to show you the code.

Former Member
0 Kudos

Nevermind. I needed the quotes around my text in the javascript.

The next thing that I have is how can I resize the iGrid so it adjusts itself automatically within a table on the page?

I would like to do something like this

height="100%" width="100%" for any applet.

Former Member
0 Kudos

Generally, I would recommend not to resize the applets or to give them a width and a height as a percentage. You'll run into display issues depending on browsers and what not.

If you want to dynamically resize the content, I would recommend using a SERVLET with a stylesheet to generate dynamic HTML content.

Using 100% for height and a width for applets is acceptable to most browsers, but again, it isn't recommended.

Answers (0)