edoyuk
asked on
Redirection in a DIV
Hello,
In the following code I am trying to change the innerHTML of the div dynamically when pressed the button.
I want to make this div with this inner HTML redirected to another page.
With the foolowing script it redirects just after I view the page.
Do you have a solution for that?
<html>
<head>
</head>
<script language="javascript">
function do_ee()
{
document.getElementById('e e').innerH TML='<html ><% Response.Redirect("modulle r.asp") %></html>'
}
</script>
<div id="ee">
aaaa
</div>
<input type = "button" onclick = do_ee()>
</html>
In the following code I am trying to change the innerHTML of the div dynamically when pressed the button.
I want to make this div with this inner HTML redirected to another page.
With the foolowing script it redirects just after I view the page.
Do you have a solution for that?
<html>
<head>
</head>
<script language="javascript">
function do_ee()
{
document.getElementById('e
}
</script>
<div id="ee">
aaaa
</div>
<input type = "button" onclick = do_ee()>
</html>
Here an example:
<html>
<head>
<title>Zvonko *</title>
<script>
function do_ee(){
window.frames.ee.location= 'http://experts-exchange.com'
document.getElementById('e eFrame').s tyle.displ ay='block' ;
document.getElementById('e eDiv').sty le.display ='none';
}
</script>
</head>
<body>
<iframe name="ee" id="eeFrame" style="display:none;"></if rame>
<div id='eeDiv'>
aaaa
</div>
<form>
<input type="button" value="EE" onclick="do_ee()">
</form>
</body>
</html>
<html>
<head>
<title>Zvonko *</title>
<script>
function do_ee(){
window.frames.ee.location=
document.getElementById('e
document.getElementById('e
}
</script>
</head>
<body>
<iframe name="ee" id="eeFrame" style="display:none;"></if
<div id='eeDiv'>
aaaa
</div>
<form>
<input type="button" value="EE" onclick="do_ee()">
</form>
</body>
</html>
ASKER
Zvonko,
Actually I am looking for a solution without using any frame or iframe.
Do you know a solution like that?
Thanks.
Actually I am looking for a solution without using any frame or iframe.
Do you know a solution like that?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AJAX solved my problem.
Thanks gops1
Thanks gops1
I guess with innerHTML you can do a write/Edit/Delete contents but not perform an action of redirecting