473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

pop up window ajax

not sure if some one got a answer to this little issue. Im built a page that calls information from a page called database-update.asp and puts it in to the div tag Reload this. What i am trying to do is make a pop up so if some one clicks the link shown it open a pop up window. When trying to do this nothing happens. Any ideas how i can get a pop up window. I be Honest i do not understand ajax as im just using it as a refresh method to get new information every 5 seconds from a event log system im working on. Before some one points out im bypassing the users ablity to have a click noise, we had a refresh with a click and it annoyed all the programmers with it and was counter productive for other areas.

here is my code

Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2. <!--
  3. .style1 {font-family: Arial, Helvetica, sans-serif}
  4. body {
  5.     margin: 0px 0px 0px 0px;
  6.     background-color: #FFFFFF;
  7.     }
  8. .style3 {
  9.     color: #FF0000;
  10.     font-weight: bold;
  11.     font-family: Arial, Helvetica, sans-serif;
  12. }
  13. -->
  14. </style>
  15. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
  16. <body>
  17. <script type="text/javascript">
  18. function Ajax(){
  19. var xmlHttp;
  20.     try{    
  21.         xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
  22.     }
  23.     catch (e){
  24.         try{
  25.             xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
  26.         }
  27.         catch (e){
  28.             try{
  29.                 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  30.             }
  31.             catch (e){
  32.                 alert("No AJAX!?");
  33.                 return false;
  34.             }
  35.         }
  36.     }
  37.  
  38. xmlHttp.onreadystatechange=function(){
  39.     if(xmlHttp.readyState==4){
  40.         document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText;
  41.         setTimeout('Ajax()',10);
  42.     }
  43. }
  44. xmlHttp.open("GET","database-update.asp",true);
  45. xmlHttp.send(null);
  46. }
  47.  
  48. window.onload=function(){
  49.     setTimeout('Ajax()',100);
  50. }
  51. </script>
  52.  
  53. <div class="style1" id="ReloadThis"></div>
  54.  
Jul 25 '09 #1
1 2744
gits
5,390 Expert Mod 4TB
the only thing i could see is, that you don't call the service every 5s but after 100ms the first time and then 10ms later, when the response is ready. you may use the window.open() method to open a plain popup but currently you just set the innerHTML of you mentioned diff. i think i don't get the point quite well - where is a link and when do you want the popup?

kind regards
Jul 27 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Charlie Garrett-Jones | last post by:
i have a server side generated web application that provides parameter forms and always opens the associated reports in a new browser window. the code that controls the opening of the new browser...
35
by: eyoung | last post by:
I call a function that takes the unit price and quantity ordered to create an amount...it looks something like this. function calculateCost() { quantity=document.RFO.quantity.value;...
5
by: Sommer.pde | last post by:
It took me some time to find out when and why this happens. When the window of Internet Explorer is closed with an AJAX call still pending, something funny happens. Do it twice, and you will have...
5
by: steve.chambers | last post by:
I'm sure this q must have been asked before but I'm really struggling to find the answer anywhere so have finally given up and will consult the usenet community - hopefully there's someone out...
0
by: ajittondwalkar | last post by:
i am developing a application in asp.net with vb and ajax implemented. in this application i want to open a report into new window. i had given in print button click event ...
3
by: jaynick | last post by:
Hello, everyone! I'm hoping that someone in this forum will be kind enough to help me out. I am having a Javascript issue related to Ajax and I just can't seem to figure it out. I am currently...
4
by: sheldonlg | last post by:
Does anyone know how to open a window and have it close by itself? You may ask why, but here it is. I want to have it open (a php script), run that script, and then close itself. I have an...
2
by: EnjoyNews | last post by:
Hi I have made a very simple JavaAjax like this: <div class="iconbox" onmouseover="InProcess('my text', 'inprocess', 'In Process');"></div> <div id=inprocess"></div> and it opens a small...
6
by: SAL | last post by:
Hi, VS2005 post I'm opening a window using the following syntax: Protected Sub lbEstValue_Click(ByVal sender As Object, ByVal e As System.EventArgs)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.