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 -
<style type="text/css">
-
<!--
-
.style1 {font-family: Arial, Helvetica, sans-serif}
-
body {
-
margin: 0px 0px 0px 0px;
-
background-color: #FFFFFF;
-
}
-
.style3 {
-
color: #FF0000;
-
font-weight: bold;
-
font-family: Arial, Helvetica, sans-serif;
-
}
-
-->
-
</style>
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
-
<body>
-
<script type="text/javascript">
-
function Ajax(){
-
var xmlHttp;
-
try{
-
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
-
}
-
catch (e){
-
try{
-
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
-
}
-
catch (e){
-
try{
-
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
catch (e){
-
alert("No AJAX!?");
-
return false;
-
}
-
}
-
}
-
-
xmlHttp.onreadystatechange=function(){
-
if(xmlHttp.readyState==4){
-
document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText;
-
setTimeout('Ajax()',10);
-
}
-
}
-
xmlHttp.open("GET","database-update.asp",true);
-
xmlHttp.send(null);
-
}
-
-
window.onload=function(){
-
setTimeout('Ajax()',100);
-
}
-
</script>
-
-
<div class="style1" id="ReloadThis"></div>
-
1 2768 gits 5,390
Recognized Expert Moderator Expert
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 window is simply html
target='_blank'. but now there is some business rules that may be checked
server side only. so if the data provided fails, i want the same target
window as the parameter form and if it passes i want a new window.
can anyone...
|
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;
unitPrice=document.RFO.unitPrice.value;
total=0;
if(isPositiveInteger(quantity))
{
|
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 to
restart the browser.
Here a little sample: http://truefriendz.de/iedos
The script on this site will open 5 test-windows one at a time.
|
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 there who's seen
it all before and can help me out! I have a webpage which needs to
make some function calls after the page has loaded - won't go into
details surfice to say here is a code fragment:
function addLoadEvent(func) {
var oldonload =...
|
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
page.clientscript.registerstartupscript(page.gettype, "showreport", "window.open("showreport.aspx")")
this command is not working if i implements ajax into the page. if i remove the ajax code (i.e. scriptmanager and updatepanel) the it works fine. but i want to open...
| |
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 using the following Javascript code for Ajax purposes and it works perfectly:
<script language = "javascript">
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if...
|
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 application that is a huge AJAX framework app. There appears
to be some interaction between that and the mail sending software I
have. I want to send email with a file attached. The software I am
using for that is htmlMimeMail5 (php5). Since I...
|
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 windows with the 'my text' in it, in a div below the
icon.
|
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)
Response.Write("<script>window.open('EstValueHelp.aspx','_help',
'width=400,height=400');</script>")
End Sub
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |