473,503 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax in Outlook

Hi,

I'm trying to get my PHP scripts to email me an email which includes a
button to enable a feature, which I'd like to be done via AJAX so the
user can open the resulting page within their Outlook email rather
than having to open a web browser.

My script is below, however I'm slightly confused, because when run in
Outlook or outside the webserver directory it won't work, but run
inside, it will. Can someone explain what I'm doing wrong? I may have
seen somewhere about accessing XML on another server - is it that AJAX
can't access files from a different URL?

Thanks

A
<html>
<style>#body{font-family:arial,helvetica;}</style>
<script language="javascript" type="text/javascript">
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!

try{
ajaxRequest = new XMLHttpRequest();
} catch (e){
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
alert("Your browser broke!");
return false;
}
}
}
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById('ajaxDiv');
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
var pw = document.getElementById('password').value;
var nm = document.getElementById('name').value;
var cn = document.getElementById('cname').value;
var em = document.getElementById('email').value;
var sc = document.getElementById('source').value;
var queryString = "?password=" + pw + "&name=" + nm + "&cname=" + cn
+ "&email=" + em + "&source=" + sc;
ajaxRequest.open("GET", "http://127.0.0.1/bbb%20dev/receive.php" +
queryString, true);
ajaxRequest.send(null);
}
</script>

<body>
<span style="font-family:arial,helvetica;font-size:10pt">
<b>Sender</b>:trial<br />
<b>Email</b>:tr***@trial.com<br />
<b>Company Name</b>:trial<br />
<b>Source</b>:trial

<form name='test' method="post" action="http://127.0.0.1/bbb%20dev/
receive.php">
<input type="hidden" id="password" name="password" value="testpw">
<input type="hidden" id="name" name="name" value="trial">
<input type="hidden" id="cname" name="cname" value="trial">
<input type="hidden" id="email" name="email" value="tr***@trial.com">
<input type="hidden" id="source" name="source" value="trial">
<input type="button" onclick="ajaxFunction()" value="Submit" />
</form>
<div id="ajaxDiv">Here</div>
</body>
</html>

May 22 '07 #1
1 4610
UKuser wrote:
Hi,

I'm trying to get my PHP scripts to email me an email which includes a
button to enable a feature, which I'd like to be done via AJAX so the
user can open the resulting page within their Outlook email rather
than having to open a web browser.

My script is below, however I'm slightly confused, because when run in
Outlook or outside the webserver directory it won't work, but run
inside, it will. Can someone explain what I'm doing wrong? I may have
seen somewhere about accessing XML on another server - is it that AJAX
can't access files from a different URL?

Thanks

A
Hi,

The day the my mailreader starts executing Ajax, I switch. ;-)

One thing about Ajax: It cannot make requests to other domains than the one
serving the page that contains your Ajax. As you described yourself above.

In what domain an email in Outlook resides.... I can only guess. Maybe
localhost, maybe something stupid M$-like.

I don't expect you can pull that trick: Ajax in an emailclient.
Only in broken emailclients, so you might give it another shot with Outlook.

So I think you are stuck with opening a browser to get some serious
interaction going.

Regards,
Erwin Moller
May 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
16471
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
5
3080
by: Mukesh | last post by:
Hi i want to use AJAX.net in my Existing Application I have already installed the ajax .net ..net 3.0 and using VS 2005 in the old application i have added a new web form then script manager...
1
7545
by: =?Utf-8?B?TGFycnkgRXBu?= | last post by:
I have an app using Ajax. The scriptmanager is within the form that is within the master page. I also have web user controls that are doing partial rendering and are "borrowing" or "inheriting"...
6
1392
by: =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= | last post by:
I have a solution with four webprojects developed in Visual Studio 2003. It is upgraded to Visual Studio Team System 2005 / Framework 2.0. Now I tried to AJAX enable one of the web projects. ...
0
1284
by: Jeremy | last post by:
If I create a folder in outlook and give it a homepage url to an ajax asp.net page I've developed, I get ajax errors on my page when viewed in outlook. If I click on a button in an update panel...
3
1562
by: noureddine | last post by:
When I create a folder in outlook and give it a homepage url to an ajax asp.net page I've developed, I get ajax errors on my page when viewed in outlook. The Error is : "Access is denied". I...
6
2627
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
7
6633
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
4
11692
by: Peter | last post by:
ASP.NET 2.0 I have an AutoCompleteExtender which works fine- I am using name, id pair in the WebService , but what I am trying to do is: once the user selects an item from the...
0
7204
marktang
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,...
0
7091
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...
0
7342
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...
0
5586
agi2029
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,...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3171
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...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
391
bsmnconsultancy
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...

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.