javascript - Links in an iframe to change the parent window -


iv been building website has table embeded in iframe, if click link embeded table opens in iframe. on other forums i've heard need put target="_parent", doesn't ever specify put cant test if works

you can view copy of code here.

i'm pretty sure need change following make work don't know

output.document.write(desc[itemp].bold() +"<br>" + links[itemp].link(links[itemp])+ "<br>"); 

any great

this code relies on fact that

'foo'.link('bar'); // "<a href="bar">foo</a>" 

that method (string.prototype.link) doesn't give option change target, you'd have manually

'<a href="' + links[itemp] + '" target="_parent">' + links[itemp] + '</a>' 

though code exceedingly old (copyright 1997), may better off having whole thing rewritten , or not using example learn from.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -