--- In [email protected], Saifi Khan <saifi.k...@...> wrote: > > On Thu, 2 Apr 2009, Manohar Vanga 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 > > > > The simplest approach would be to design the interface as a > bunch of DOM nodes and each node having an id . > > The generated HTML code has these DOM nodes embedded in the > page. Now JavaScript code can be used to in-memory modify each > of the nodes or their attributes. > > i could be totally wrong here as my knowledge of client side web > is very limited. i'm just extrapolating from my knowledge of > HTML page parsing and in-memory construction. > > > thanks > Saifi. >
This is currently what I am trying to do. If I have a CGI script that generates a page and embeds JavaScript into the page, is there any reason for the JavaScript to not work?

