Click here to Skip to main content
15,900,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am accessing the webpage by using url. for eg: http://www.google.com

i loaded tat link from Iframe src dynamically.

In this page right cornet top.. having "sign in" button. just i want to disable tat or want to disable webforms_postbackoption.

suppose the button was clicked. then page cannot redirect to another link..

pls tel me the solution
Posted
Comments
ZurdoDev 7-Mar-13 7:02am    
This is not clear. Please be clear as to exactly what you need and where you are stuck.
hari301 7-Mar-13 7:17am    
dynamically i am loading a page into iframe via URL. the loaded page contain back button. i have to disable tat back operation. this is exact query.
ZurdoDev 7-Mar-13 7:26am    
You are saying that the loaded page in the iframe has a back button? If so, why can't you disable it?
hari301 7-Mar-13 7:36am    
because am not designed that page, which is load into iframe. just pass the parameter from header.location. after loading, if i press that back button, i redirect into original. tats the main reason to disable tat operation.
ZurdoDev 7-Mar-13 7:39am    
You should be able to use javascript to do it. Something like window.iframe.document.getElementById('buttonid')

1 solution

you can hide that button using jquery or even javascript.

at onload event of iframe you can set a button invisible or display none

JavaScript
<script type="text/javascript">
 function displayResult() { document.getElementById("targettedbutton").style.display="none"; }


<frame src="www.something.com" onload="javascript:displayResult()"></frame></script>



thats done
 
Share this answer
 
Comments
hari301 8-Mar-13 12:11pm    
How can i access the element from page, which i loaded in iframe?

then loaded page is an ASP.Net and thats 3rd party website.

Am using PHP..
Kolkata .NET 8-Mar-13 12:19pm    
ohh... document.getelementbyid may not be the the exact answer, but as far as the concept is concerned - if the id remains fixed - which u already know, then its possible to find the button. after all - whether it is asp or php page - all contain html tags after they are rendered.
hari301 8-Mar-13 12:25pm    
<script type="text/javascript">
iframe = document.getElementById('ifrm');
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
function load1() {
innerDoc.document.getElementById("LinKButton1").style.display="none";
}
</script>
above coding only i have used. i know the button id "LinkButton1". while i run. following error occur. "Uncaught TypeError: Cannot call method 'getElementById' of undefined "

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900