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{fo nt-family:arial,he lvetica;}</style>
<script language="javas cript" 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.XMLHT TP");
} catch (e){
alert("Your browser broke!");
return false;
}
}
}
ajaxRequest.onr eadystatechange = function(){
if(ajaxRequest. readyState == 4){
var ajaxDisplay = document.getEle mentById('ajaxD iv');
ajaxDisplay.inn erHTML = ajaxRequest.res ponseText;
}
}
var pw = document.getEle mentById('passw ord').value;
var nm = document.getEle mentById('name' ).value;
var cn = document.getEle mentById('cname ').value;
var em = document.getEle mentById('email ').value;
var sc = document.getEle mentById('sourc e').value;
var queryString = "?password= " + pw + "&name=" + nm + "&cname=" + cn
+ "&email=" + em + "&source=" + sc;
ajaxRequest.ope n("GET", "http://127.0.0.1/bbb%20dev/receive.php" +
queryString, true);
ajaxRequest.sen d(null);
}
</script>
<body>
<span style="font-family:arial,he lvetica;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***@tr ial.com">
<input type="hidden" id="source" name="source" value="trial">
<input type="button" onclick="ajaxFu nction()" value="Submit" />
</form>
<div id="ajaxDiv">He re</div>
</body>
</html> 1 4628
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 - microlink pattern tutorial : A microlink is a link that opens up
|
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
and then update panel and some control in it to test it.
When i run the programme ir does not work . imean ajax does not works
|
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" the scriptmanager from the
master page. Heck, when they're rendered, the scriptmanager is on all the
pages and it works.
However, in the VS2005 designer, I constantly see "Can't render image"
errors, and it's nearly impossible to effectively use...
|
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.
1) I installed AJAX and did a demo based on Scotts ToDo demo application. It
worked fine.
2) Then I carefully copied all sections from the web.config file of the demo
to my real project.
3) I added ScriptManager and UpdatePanel to one very simple...
|
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 I will get an Internet Explorer
Script Error "Access is denied." If I clicke Yes to continue running
scripts, and click the button in the update panel again I'll get an error
"Sys.InvalidOperationException: Cannon abort when executor has not...
| |
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 don't get this error when viewing the page directely in IE.
Thank you
Noro
|
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 in the page and I've got code
to get the selected value from it in the
Radiobuttonlist_SelectedIndexChanged event.
The code in there is:
Protected Sub rblFMSValue_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs)
|
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
tabcontainer which has 1 panel already, however I want to try create the
TabPanels dynamically. I followed the advice here:
http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe
Stagner)
|
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 AutoCompleteExtender I want to automatically retreive data
from the database and populate the fields on the screen.
How do I trigger a server side event after the user selects an item from the
AutoCompleteExtender or retrieve data from database on client side...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |