I'm trying to translate an asp application, i have some difficulties with a particular line : --- Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") ---
Classical ajax exemples rather use : [...] req = new ActiveXObject("Microsoft.XMLHTTP");
.... But i'm not sure the ActiveXObject is identical to the original : Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
I'm not an asp expert, can you give me some tips on that question ?
I am trying to use AJAX and JSON to do this. I have copied an example of using HttpRequest Object as the backbone of this from http://www.w3schools.com/dom/dom_http.asp. Further, I am enclosing both of my files here, in full as opposed to mere snippets. This code does what I wish it to do except:
1. It does not update when getdata.php is rewritten. On non MSIE broswers, it shows when first invoked, but not subsequently. 2. It fails altogether under MSIE (6.026 SP1 || SP2) -- I never get xmlhttp.readyState==4 under MSIE.
I am trying to load html stream directly into webbrowser in delphi. The html contains java script. It loads xml and xsl files and display the xml content in the web browser. I got an error, says access denied for the command xmlDoc.load(fname); If I save the html into a file, test.html, and double click it, it is fine, no problem. The code is actually copied from [URL].
i am starting a new project using Visual Studio 2010 ad using the same jQuery filesofa previous project that didn't cause errors.Visaul Studio always raisesthe same error in jquery.min.js Microsoft JScript runtime error: 'parentNode' is null or not an object I click on "continue" for that error message and the page loads fine and I don't see the javascript error icon in the bottom left corner of IE. This really baffles me. When I launch the application using Firefox I don't get an error in Visual Studio. Does anyone have any tips on debugging this jquery.min.js ? Has anyone seen something similar. Just starting this project and I already lost 12 hours troubleshooting this problem. I've looked at the html code and I can't see anything that would cause an error Here is the HTML.
Currently transitioning from a shared host to a dedicated server. The same code that works on the old server is not working on the dedicated server. It is a simple AJAX request like:
<code> function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } }
With the code as is above, the requests works fine in IE. With Firefox it throws a 403 on the page. A call to the response.php page with parameters runs correctly outside of AJAX. Changing all POST requests to GET resolves the issue, but I would prefer not to have to change ALL POST requests to GET requests.
Does anyone know of a setting on the new server that can cause FireFox (1.5.x and 2.0.x) to return a 403 with an AJAX post call?
I tried POSTing from XMLHttpRequest, i can get the XML right on server but responseXML from server is coming null. I can see the XML right in responseText. but responseXML is null. responseText to DOM conversion also fails while the XML in responseText seems valid ..
HTML Code:<div class="drag q1 bar" style="top: 10px; left: 0px; position: absolute;">b</div>i assign variables like so:
Code: var style = notationrow[i].childNodes[nodecount].getAttribute("style"); var nodeclass = notationrow[i].childNodes[nodecount].getAttribute("class");
Suppose I have the following inside a function:Code JavaScript:document.getElementById('display_content').innerHTML = "hello";The above works.However, when I define it like the following it says display_content is null on firefox error console.
Code JavaScript: var display_content = document.getElementById('display_content');
This seemed like it should be so simple. It works fine in Firefox, but not in IE. The goal is to disable the form's Submit button, until the question is answered. (The alert is for troubleshooting.)
When using the code below the alert returns a value of null. In the past this has never happened, it has always returned the xml file I'm requesting. I have noticed a strange difference between browsers. This script is used to fill a form automatically. In its current state it works perfectly in opera, but does not work in firefox or IE (used to work in all the browsers). I'm by no means a javascript expert, am I missing something here?
I have a form in which I preset some text inside a readonly, disabled textarea using javascript ('data' being the text): document.getElementById("link_of_current_view2").value = data;
However, once I call my .php script to process the form, the element is null. How do I get it to pass along that data, which is in the textbox when the user views the form? <div id="sendlink" class="contact_form" style="z-index:10;"> <a class="close" onclick="document.sendlink_form.reset();return false">CLOSE</a> <form id='sendlink_form' name='sendlink_form' method="post" action="sendlink.php" > <label for="link_of_current_view2">Link: </label> <textarea id="link_of_current_view2" name="_of_current_view2" class="link_of_current_view" rows="2" disabled="disabled" wrap="soft" size="58" value="" readonly="readonly" value=/>
It's purpose is to check for valid date and allows formats mm/dd/yyyy, m/dd/yyyy, mm/d/yyyy or m/d/yyyy.
When I try it with the code below it always returns null.
Code:
function isValidDate(/* String */ p1_date) { var x = "^(((0?[1-9]|1[012])/(0?[1-9]|1d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(19|[2-9]d)d{2}|0?2/29/((19|[2-9]d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$";
I'm using the $F of the prototype library to send data through the Ajax Request. I'm having problems using the $F to reference fields sent back through an original Request. My first request sends a form back to the user in the type such as <input text name=foo> and at the bottom of the returned form I have a second ajax call to send the fresh data to the another script. The problem is that the new data in the form cannot be referenced from $F. My question is how can I pass the new data in the javascript to another Ajax call either by $F or by other means?
I have a following string: var myHTML = "<html><body>testing hope this work in html</body></html>"; alert($(myHTML).children("body").html()); Why does the alert return NULL, instead of "testing hope this work in html" ???
I'm trying to retrieve some data trough yahoo pipes, but it always returns null. However if i go to my yahoo pipe's site and i launch it, the pipe works perfectly.[code]
Either I'm having a really dim Friday, or something strange is going on. I'm trying to add a method to the Validator plugin, using the following regex:
I am having trouble with ActiveXObject. I have a function which includes this snippet:
alert('INIT 1'); orgdoc = new ActiveXObject('Microsoft.XMLDOM'); alert('INIT 2');
I see the "INIT 1" alert box, but "INIT 2" is never displayed. It is as if the ActiveXObject fails and the function exits without executing anything else. Is that possible? And what could possible problems be?
What is wrong with my code....The function "function ValidaProdutos()" is not working....I need to execute the procedure to insert data in a Database.... What can I do to have this code working.... I don't get error line, but nothing happen in my database.... I think the connection is not right.... Could anyone give a sample code on how to do that.....
I have a piece of javascript that attaches a PDF document to an outlook form. However the PDF that I am pulling has a default name such as 'test' and I would like to change it to say 'client.pdf'. Is this possible in the script below?
var theApp = new ActiveXObject("Outlook.Application"); var theMailItem = theApp.CreateItem(0); theMailItem.to = "test@test.com" theMailItem.Subject = "test";
I am using ActiveXObject to read a text file using javascrilpt, it is working in IE but when i use in other browsers, it is not working. Code which I have written: var fText; var location = "D:\a.txt"; var fso = new ActiveXObject("Scripting.FileSystemObject"); var tempFile = fso.OpenTextFile(location, 1); while(tempFile.AtEndOfStream!=true) { fText = tempFile.ReadLine(); } The above code is working in IE but not working in other browsers.