Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Redirection in a DIV

Posted on 2006-07-17
Last Modified: 2008-02-26
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?

<script language="javascript">
 function do_ee()
     document.getElementById('ee').innerHTML='<html><% Response.Redirect("moduller.asp") %></html>'
<div id="ee">

<input type = "button" onclick = do_ee()>

Question by:edoyuk
  • 2
  • 2
LVL 17

Expert Comment

ID: 17121003
What exactly has to be done, should the page get redirected or change to content of the DIV

I guess with innerHTML you can do a write/Edit/Delete contents but not perform an action of redirecting
LVL 63

Expert Comment

ID: 17121073
Here an example:
<title>Zvonko &#42;</title>
 function do_ee(){
<iframe name="ee" id="eeFrame" style="display:none;"></iframe>
<div id='eeDiv'>
<input type="button" value="EE" onclick="do_ee()">


Author Comment

ID: 17121110
Actually I am looking for a solution without using any frame or iframe.

Do you know a solution like that?

LVL 17

Accepted Solution

gops1 earned 500 total points
ID: 17121133
Are you trying to get the contents of "moduller.asp" inside the DIV??

Then you can get it done either using AJAX thats one way
Other way is get the contents of moduller.asp inside the div and keep it hidden and show it when required

Author Comment

ID: 17121341
AJAX solved my problem.
Thanks gops1

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question