...

View Full Version : Javascript Edit page property in modal window



jobertlapena26
06-24-2009, 03:08 AM
Hi,

Can someone help me on this. I am opening a url using a javascript function in a javascript modal popup dialog window. I would like to know if there is a way to edit the property of the page opened in a popup? like I want to hide the banner of the page. is it possible?

this is a sample script i found in the net:
TINY.box.show('advanced.html',1,300,150,1,3)

can we edit the advanced.html page properties?

Any help would be greatly appreciated. Thanks

Philip M
06-24-2009, 07:25 AM
I want to hide the banner of the page. is it possible?


Rule 1.4) No illegal requests- Do not post requests that are illegal or break the usage terms of the service in question, such as where to download warez, disable pop up ads on your free host etc.

bugmenot
07-12-2009, 03:35 AM
this is a sample script i found in the net:
TINY.box.show('advanced.html',1,300,150,1,3)
can we edit the advanced.html page properties?

I do not support 3rd party scripts. And have no idea about "properties". But assuming here and below you have reference to newly open()ed window as w


with (w) {
// problem 1: get reference(s) to offensive element(s)
// g*syndication is domain squatters
el = document.getElementById("partnerlinks");
// or, more complex
els = document.getElementsByTagName("DIV");
// see getElementXXXX() reference for more

// problem 2: use CSS to hide them
for (var i = 0; i < els.length; i++) {
// spam is SEO, proper term is trolling :)
if (els[i].className.toLowerCase() == "newscredit") {
// using block rules
els[i].display = "none";
// or, positioning rules
els[i].visibility = "hidden";
// or, banish crap inside them to the null
els[i].innerHTML = null;
// see element, node and CSS reference for more
}
}
}


This will not work across domains.

rnd me
07-12-2009, 07:04 PM
showmodaldialog freezes the parent.
if you don't control both urls, you won't be able to do this...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum