Manohar,
Let us say your IFRAME is named 'myframe'
<IFRAME name="myframe" onload="changelinks();" .....
Add the onload event for your IFRAME, in the onload handler you can use a
similar JS to this:
var atags = parent.myframe.document.getElementsByTagName("a");
for(i=0;i<atags.length; i++)
atags[i].href="change here";
}
Let me know how it works
Satish Vellanki
Fran Lebowitz - "Life is something to do when you can't get to sleep."
On Wed, Apr 1, 2009 at 9:16 PM, Manohar Vanga <[email protected]>wrote:
> I have an iframe with a lot of links in it. When someone clicks a link
> in
> the iframe, I want to change the target link using javascript. For example,
>
> <a href="./test?v=1">Hello</a>
>
> When someone clicks the above, I want to modify the target to, say:
> "./test?v=1&p=1"
> The constraint is that I cannot modify the anchor tags themselves of the
> iframe as they are being generated seperately by an external script. What I
> can do is add javascript to the iframe window or add javascript to the page
> containing the iframe.
>
> How do I go about this?
>
> Regards
> Manohar Vanga
>
>
[Non-text portions of this message have been removed]