Search Results

Search found 535 results on 22 pages for 'xmlhttprequest'.

Page 10/22 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • jsonp cross domain only working in IE

    - by iboeno
    EDIT: At first I thought it wasn't working cross domain at all, now I realize it only works in IE I'm using jQuery to call a web service (ASP.NET .axmx), and trying to us jsonp so that I can call it across different sites. Right now it is working ONLY in IE, but not in Firefox, Chrome, Safari. Also, in IE, a dialog pops up warning "This page is accessing information that is not under its control..." Any ideas? Here is the code: $.ajax({ type: "POST", url: "http://test/TestService.asmx/HelloWorld?jsonp=?", dataType: "jsonp", success: function(data) { alert(data.prop1); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.status + " " + textStatus + " " + errorThrown); } }); And the server code is: [ScriptService] public class TestService : System.Web.Services.WebService{ [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public void HelloWorld() { string jsoncallback = HttpContext.Current.Request["jsonp"]; var response = string.Format("{0}({1});", jsoncallback, @"{'prop1' : '" + DateTime.Now.ToString() + "'}"); HttpContext.Current.Response.Write(response); } }

    Read the article

  • Question about AJAX

    - by Doug
    function showHint(str) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("games").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","hw9.database.php?name="+str,true); xmlhttp.send(); } I'm learning AJAX at the moment. The code here basically receives the echo from the PHP and then puts it in element id games. My question is, if I wanted to have AJAX send 3 different http requests to 3 different PHP scripts and if I wanted to retrieve data from each one and then put it in 3 different element id's then would I make 3 copies of this same function? I would imagine that there should be a more efficient way. Thanks!

    Read the article

  • Specify only the second parameter in a javascript function

    - by Ben McCormack
    The spec for the jQuery ajax.error function is: error(XMLHttpRequest, textStatus, errorThrown)Function I'm trying to catch the error and display the textStatus, but I can't figure out how to specify only the textStatus without having to put in a variable name for XMLHttpRequest and errorThrown. My code currently looks like this: $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: hbAddressValidation.webServiceUrl, data: this.jsonRequest, dataType: "json", timeout: 5, success: function (msgd) { //... }, error: function (a,textStatus,b) { $("#txtAjaxError").val("There was an error in the AJAX call: " + textStatus); } }); You can see in my code that I'm putting variables a and b as placeholders for the first and last variables in the error function. I know that in my success function, I'm only providing one parameter and it works fine, but in that case data is the first parameter. In the case of error, textStatus is the second parameter, but that's the only one I want to specify. Is this possible?

    Read the article

  • Using $.getJSON to perform cross domain request problem.

    - by Ahmed
    I'm using the following code to make cross domain request using $.getJSON, request completed but with errors, I cannot exactly detect what is the thrown error. Based on callback param of request value I route it to a certain method which retrieves required JSON data. $.getJSON("http://wthsrvr:45452/Handler.ashx/?Callback=DocumentReadStatus", { userID: vuserID, documentID: vdocumentID, format: "json" }, function(result) { if (result.readStatus == '1') { alert("ACCEPTED"); } else if (result.readStatus == '0') { alert("NOT ACCEPTED"); } else { alert(result.readStatus); } }); FYI: while development of this locally, everything worked fine, but after solution deployment to server and trying to do the same, I got that problem. Also, I tried the same functionality with web service, I got the same problem while calling web service from server. I'm using ajaxSetup to detect thrown errors. $.ajaxSetup({ "error": function(XMLHttpRequest, textStatus, errorThrown) { alert("textStatus: " + textStatus); alert("errorThrown: " + errorThrown); alert("responseText: " + XMLHttpRequest.responseText); } });

    Read the article

  • PHP apache_request_headers() diagrees with reality (as confirmed by Firebug): why?

    - by Peter Howe
    I have written a web app in PHP which makes use of Ajax requests (made using YUI.util.Connect.asyncRequest). Most of the time, this works fine. The request is sent with an X-Requested-With value of XMLHttpRequest. My PHP controller code uses apache_request_headers() to check whether an incoming request is Ajax or not and all works well. But not always. Intermittently, I'm getting a situation where the Ajax request is sent (and Firebug confirms for me that the headers on the request include an X-Requested-With of XMLHttpRequest) but apache_request_headers() is not returning that header in its list. The output from when I var_dump the apache_request_headers() is as follows (note the lack of X- 'Host' => string 'peterh.labs.example.com' (length=26) 'User-Agent' => string 'Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3' (length=105) 'Accept' => string 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' (length=63) 'Accept-Language' => string 'en-gb,en;q=0.5' (length=14) 'Accept-Encoding' => string 'gzip,deflate' (length=12) 'Accept-Charset' => string 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' (length=30) 'Keep-Alive' => string '300' (length=3) 'Connection' => string 'keep-alive' (length=10) 'Referer' => string 'http://peterh.labs.example.com/qmail/' (length=40) 'Cookie' => string 'WORKFLOW_SESSION=55f9aff2051746851de453c1f776ad10745354f6' (length=57) 'Pragma' => string 'no-cache' (length=8) 'Cache-Control' => string 'no-cache' (length=8) But Firebug tells me: Request Headers: Host peterh.labs.example.com User-Agent Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3 Accept text/html,application/xhtml+xml,application/xml;q=0.9,**;q=0.8 Accept-Language en-gb,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive X-Requested-With XMLHttpRequest Referer http://peterh.labs.example.com/qmail/ Cookie WORKFLOW_SESSION=55f9aff2051746851de453c1f776ad10745354f6 This mismatch is (apparently) intermittent when executing the same code. But I don't believe in "intermittent" when it comes to software! Help!

    Read the article

  • JQuery UI Tabs widget error handling

    - by dthrasher
    When an ajax request fails, the JQuery UI Tabs widget stops responding and the "Loading..." spinner remains on the tab that caused the error. I can get the ajax callback to give me some sort of alert message like so: $('#localtabs > ul').tabs({ ajaxOptions: { success: tabLoadSuccessCallback, error: tabLoadFailureCallback} }); function tabLoadSuccessCallback(XMLHttpRequest, textStatus, errorThrown) { alert("Yay!");} function tabLoadFailureCallback(XMLHttpRequest, textStatus, errorThrown) { alert("Could not get search results.");} But what I'd really like is to be able to display a message within the panel, cancel the spinner, and disable the tab that caused the problem while leaving the rest of the tabs operational. Does anyone have any ideas for how to do this?

    Read the article

  • Why can I not send more than one request?

    - by Doug
    function stateChanged(idname) { xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(idname).value = xmlhttp.responseText; } } } function openSend(php,idname) { stateChanged(idname); xmlhttp.open("GET",php,true); xmlhttp.send(); } function showHint() { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } openSend("time.php", "Time"); openSend("date1.php", "Date1"); openSend("date2.php", "Date2"); return; } These two say aborted (in Firebug) and doesn't return a value. Why is that? Is it because I can't send more than 1 request? openSend("time.php", "Time"); openSend("date1.php", "Date1"); If I can't, how could I achieve 3 requests with only one invocation?

    Read the article

  • making ajax request to another server

    - by santhosh
    Hi, I had a ajax sample code from W3Schools, where If i request ajax call to remote server the request getting fails. function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","http://www.google.com",true); xmlhttp.send(); } How to solve this..?

    Read the article

  • How can I request a url using AJAX

    - by Nikhil Dinesh
    I am quite new in this area. I need to find out how to make a request to my solr server using Ajax How can I give a url(my solr server's url) in request Any body know how to deal with this? How can i make a request to the below mentioned url http://mysite:8080/solr/select/?q=%2A%3A%2A&version=2.2&start=0&rows=100&indent=on See here: Corrected the Code Snippet as below function getProductIds() { var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) console.dir(xmlhttp); else alert('no response'); var ajaxURL = "http://localhost:8080/solr/select/?q=*:*&version=2.2&start=0&rows=100&indent=on"; xmlhttp.open("GET", ajaxURL, true); xmlhttp.send(); } This is my code, it always showing "no response" Thanks.

    Read the article

  • Permalink Ajax Issue Wordpress

    - by Soumya
    function AjaxRequest(section,divName) { var pageurl = fullPath+"/ajaxrequest.php?section="+section+"&divName="+divName; //alert(pageurl); var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(divName).innerHTML=''; document.getElementById(divName).innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET",pageurl,true); xmlhttp.send(); } I have a Code like that in wordpress which is calling a page using ajax. It is working fine when the page are coming in ID like ?page_id=37 but stop working when I am activating Permalink like /overview/ajaxpage. I am getting 404 pafe error on xmlhttp.readyState. Can any one help me to solve it. I know its a permalink Problem probably this code of ajax is not sufficient for transmuting Permalink.

    Read the article

  • Why isn't IE displaying this alert()?

    - by George Edison
    I have the following piece of code: // setup the AJAX request var pageRequest = false; if(window.XMLHttpRequest) pageRequest = new XMLHttpRequest(); else if(window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP"); // callback pageRequest.onreadystatechange = function() { alert('pageRequest.readyState: ' + pageRequest.readyState + '\npageRequest.status: ' + pageRequest.status); } pageRequest.open('POST','ajax.php',true); // q_str contains something like 'data=value...' pageRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); pageRequest.setRequestHeader("Content-length", q_str.length); pageRequest.setRequestHeader("Connection", "close"); pageRequest.send(q_str); This works fine in Chrome, but IE chokes on it, spitting out an "Unspecified error." and it points to the line with the alert() in it. Why can't it display the alert?

    Read the article

  • code in xmlhttp.readyState==4 doen't get executed

    - by shazia
    function download() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { //alert(xmlhttp.readyState); if(xmlhttp.readyState==4 && xmlhttp.status==200) { alert (xmlhttp.responseText); } } xmlhttp.open("GET","import.php?file="+document.getElementById('uploaded_file').value,false); xmlhttp.send(); // location.reload(true); } if I put alert and monitor xmlhttp.readyState then it shows me that its status does turn 4 and it does go in the if statement, if I don't monitor it with alert then it doesn't go in the if statement but I know import.php is working because I can see the changes in the database. I don't know whats going on...can anyone help. Thanks

    Read the article

  • Ajax Double Call

    - by Lordareon
    with this function <script type="text/javascript"> function ajaxcall(div, page) { if (window.XMLHttpRequest) {xmlhttp=new XMLHttpRequest();} else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(div).innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET",page,true); xmlhttp.send(); } </script> i use my ajax. But in the page i call 2 times this function: <script type="text/javascript">ajaxcall("menu", "perfil.php");</script> <script type="text/javascript">ajaxcall('mapadiv', "map2.php");</script> But happens that only one of them works, if i remove one the other works. What im doing wrong? Thanks!

    Read the article

  • AJAX Problem - No response text in FireFox, but ok in IE

    - by Taiba
    Hi, I am making a simple AJAX call to an external site. It works ok in IE, but in Firefox, not response text is returned. I think it might have something to do with the response being "chunked", but I'm not sure. Any ideas? Thanks. function loadXMLDoc() { var xmlhttp; var urlString = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=6025&Destination_Postcode=6055&Country=AU&Weight=100&Service_Type=STANDARD&Length=100&Width=100&Height=100&Quantity=2"; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { window.alert(xmlhttp.responseText); } } xmlhttp.open("GET", urlString, true); xmlhttp.send(); }

    Read the article

  • javascript xml saving problem

    - by Guru
    hi there, I want to modify some data on XML file residing on server side by using javascript. I'm using following code var xh; if(window.XMLHttpRequest) { xh=new XMLHttpRequest(); } else { xh=new ActiveXObject("Microsoft.XMLHTTP"); } xh.open("get","books.xml",false); xh.send(""); var xdoc=xh.responseXML; var x=xdoc.getElementsByTagName("title"); x[0].getAttributeNode("lang").nodeValue="zh"; xh.save("books.xml"); but its not working Thanks in advance, Guru

    Read the article

  • Script For Detecting Availability of XMLHttp in Internet Explorer

    - by Duncan Mills
    Having the XMLHttpRequest API available is key to any ADF Faces Rich Client application. Unfortunately, it is possible for users to switch off this option in Internet Explorer as a Security setting. Without XMLHttpRequest available, your ADF Faces application will simply not work correctly, but rather than giving the user a bad user experience wouldn't it be nicer to tell them that they need to make some changes in order to use the application?  Thanks to Blake Sullivan in the ADF Faces team we now have a little script that can do just this. The script is available from https://samplecode.oracle.com here - The attached file browserCheck.js is what you'll need to add to your project.The best way to use this script is to make changes to whatever template you are using for the entry points to your application. If you're not currently using template then you'll have to make the same change in each of your JSPX pages. Save the browserCheck.js file into a /js/ directory under your HTML root within your UI project (e.g. ViewController)In the template or page, select the <af:document> object in the Structure window. From the right mouse (context) menu choose Facet and select the metaContainer facet.Switch to the source code view and locate the metaContainer facet. Then insert the following lines (I've included the facet tag for clarity but you'll already have that):      <f:facet name="metaContainer">        <af:resource type="javascript"                      source="/js/browserCheck.js"/>        <af:resource type="javascript">           xmlhttpNativeCheck(                     "help/howToConfigureYourBrowser.html");        </af:resource>      </f:facet>Note that the argument to the xmlhttpNativeCheck function is a page that you want to show to the user if they need to change their browser configuration. So build this page in the appropriate place as well. You can also just call the function without any arguments e.g. xmlhttpNativeCheck(); in which case it will pop up default instructions for the user to follow, but not redirect to any other page.

    Read the article

  • Tools for building long-running Javascript webapp

    - by FilipK
    Given my lack of familiarity with such tools, could you suggest what tools / frameworks would be suitable for developing a long-running JavaScript webapp? The webapp would display a constantly updating chart. The updates would come through WebSockets (preferably) or XmlHttpRequest. I know and have written JavaScript with JQuery, but for this task I assume something like backbone.js or ExtJS would be appropriate (or maybe not?).

    Read the article

  • data is not posted in $_POST variable using AJAX [migrated]

    - by Oliver
    Im having a problem in one of my script. Server is running in php, and im using AJAX to post data. Here is my script. PHP script: 0){ echo "Search Result :"; for ($x=0;$xProject Name:   ".mysql_result($result,$x,"projname").""; echo "APMS ID:   ".mysql_result($result,$x,"apmsid").""; echo "Prefix/es:   ".mysql_result($result,$x,"projprefix").""; echo "Usage Type:   ".mysql_result($result,$x,"usagetype").""; echo "Rate:   ".mysql_result($result,$x,"projrate").""; echo "Offer Details:   ".mysql_result($result,$x,"offerdetails").""; } }else{ echo "No results found ..."; } }else{ echo "Problems encountered while processing the data ..."; } ? JS Script: function QueryPrefix() { var xmlhttp; var pStr = document.getElementById('Editbox2'); var htmlHolder = document.getElementById('Html1'); var butStr = document.getElementById('Button1'); if (pStr.value.length == 0){ alert("Please enter a value on the box provided!"); return; } pStr.value=""; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { htmlHolder.innerHTML=xmlhttp.responseText; butStr.disabled=false; } } butStr.disabled=true; xmlhttp.open("POST","searchutype.php",false); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("pStr=" + pStr.value); }

    Read the article

  • Exam 70-480 Study Material: Programming in HTML5 with JavaScript and CSS3

    - by Stacy Vicknair
    Here’s a list of sources of information for the different elements that comprise the 70-480 exam: General Resources http://www.w3schools.com (As pointed out in David Pallmann’s blog some of this content is unverified, but it is a decent source of information. For more about when it isn’t decent, see http://www.w3fools.com ) http://www.bloggedbychris.com/2012/09/19/microsoft-exam-70-480-study-guide/ (A guy who did a lot of what I did already, sadly I found this halfway through finishing my resources list. This list is expertly put together so I would recommend checking it out.) http://davidpallmann.blogspot.com/2012/08/microsoft-certification-exam-70-480.html http://pluralsight.com/training/Courses (Yes, this isn’t free, but if you look at the course listing there is an entire section on HTML5, CSS3 and Javascript. You can always try the trial!)   Some of the links I put below will overlap with the other resources above, but I tried to find explanations that looked beneficial to me on links outside those already mentioned.   Test Breakdown Implement and Manipulate Document Structures and Objects (24%) Create the document structure. o This objective may include but is not limited to: structure the UI by using semantic markup, including for search engines and screen readers (Section, Article, Nav, Header, Footer, and Aside); create a layout container in HTML http://www.w3schools.com/html/html5_new_elements.asp   Write code that interacts with UI controls. o This objective may include but is not limited to: programmatically add and modify HTML elements; implement media controls; implement HTML5 canvas and SVG graphics http://www.w3schools.com/html/html5_canvas.asp http://www.w3schools.com/html/html5_svg.asp   Apply styling to HTML elements programmatically. o This objective may include but is not limited to: change the location of an element; apply a transform; show and hide elements   Implement HTML5 APIs. o This objective may include but is not limited to: implement storage APIs, AppCache API, and Geolocation API http://www.w3schools.com/html/html5_geolocation.asp http://www.w3schools.com/html/html5_webstorage.asp http://www.w3schools.com/html/html5_app_cache.asp   Establish the scope of objects and variables. o This objective may include but is not limited to: define the lifetime of variables; keep objects out of the global namespace; use the “this” keyword to reference an object that fired an event; scope variables locally and globally http://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/ http://www.quirksmode.org/js/this.html   Create and implement objects and methods. o This objective may include but is not limited to: implement native objects; create custom objects and custom properties for native objects using prototypes and functions; inherit from an object; implement native methods and create custom methods http://www.javascriptkit.com/javatutors/object.shtml http://www.crockford.com/javascript/inheritance.html http://stackoverflow.com/questions/1635116/javascript-class-method-vs-class-prototype-method http://www.javascriptkit.com/javatutors/proto.shtml     Implement Program Flow (25%) Implement program flow. o This objective may include but is not limited to: iterate across collections and array items; manage program decisions by using switch statements, if/then, and operators; evaluate expressions http://www.javascriptkit.com/jsref/looping.shtml http://www.javascriptkit.com/javatutors/varshort.shtml http://www.javascriptkit.com/javatutors/switch.shtml   Raise and handle an event. o This objective may include but is not limited to: handle common events exposed by DOM (OnBlur, OnFocus, OnClick); declare and handle bubbled events; handle an event by using an anonymous function http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html http://javascript.info/tutorial/bubbling-and-capturing   Implement exception handling. o This objective may include but is not limited to: set and respond to error codes; throw an exception; request for null checks; implement try-catch-finally blocks http://www.javascriptkit.com/javatutors/trycatch.shtml   Implement a callback. o This objective may include but is not limited to: receive messages from the HTML5 WebSocket API; use jQuery to make an AJAX call; wire up an event; implement a callback by using anonymous functions; handle the “this” pointer http://www.w3.org/TR/2011/WD-websockets-20110419/ http://www.html5rocks.com/en/tutorials/websockets/basics/ http://api.jquery.com/jQuery.ajax/   Create a web worker process. o This objective may include but is not limited to: start and stop a web worker; pass data to a web worker; configure timeouts and intervals on the web worker; register an event listener for the web worker; limitations of a web worker https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers http://www.html5rocks.com/en/tutorials/workers/basics/   Access and Secure Data (26%) Validate user input by using HTML5 elements. o This objective may include but is not limited to: choose the appropriate controls based on requirements; implement HTML input types and content attributes (for example, required) to collect user input http://diveintohtml5.info/forms.html   Validate user input by using JavaScript. o This objective may include but is not limited to: evaluate a regular expression to validate the input format; validate that you are getting the right kind of data type by using built-in functions; prevent code injection http://www.regular-expressions.info/javascript.html http://msdn.microsoft.com/en-us/library/66ztdbe6(v=vs.94).aspx https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/typeof http://blog.stackoverflow.com/2008/06/safe-html-and-xss/ http://stackoverflow.com/questions/942011/how-to-prevent-javascript-injection-attacks-within-user-generated-html   Consume data. o This objective may include but is not limited to: consume JSON and XML data; retrieve data by using web services; load data or get data from other sources by using XMLHTTPRequest http://www.erichynds.com/jquery/working-with-xml-jquery-and-javascript/ http://www.webdevstuff.com/86/javascript-xmlhttprequest-object.html http://www.json.org/ http://stackoverflow.com/questions/4935632/how-to-parse-json-in-javascript   Serialize, deserialize, and transmit data. o This objective may include but is not limited to: binary data; text data (JSON, XML); implement the jQuery serialize method; Form.Submit; parse data; send data by using XMLHTTPRequest; sanitize input by using URI/form encoding http://api.jquery.com/serialize/ http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml http://stackoverflow.com/questions/327685/is-there-a-way-to-read-binary-data-into-javascript https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI     Use CSS3 in Applications (25%) Style HTML text properties. o This objective may include but is not limited to: apply styles to text appearance (color, bold, italics); apply styles to text font (WOFF and @font-face, size); apply styles to text alignment, spacing, and indentation; apply styles to text hyphenation; apply styles for a text drop shadow http://www.w3schools.com/css/css_text.asp http://www.w3schools.com/css/css_font.asp http://nicewebtype.com/notes/2009/10/30/how-to-use-css-font-face/ http://webdesign.about.com/od/beginningcss/p/aacss5text.htm http://www.w3.org/TR/css3-text/ http://www.css3.info/preview/box-shadow/   Style HTML box properties. o This objective may include but is not limited to: apply styles to alter appearance attributes (size, border and rounding border corners, outline, padding, margin); apply styles to alter graphic effects (transparency, opacity, background image, gradients, shadow, clipping); apply styles to establish and change an element’s position (static, relative, absolute, fixed) http://net.tutsplus.com/tutorials/html-css-techniques/10-css3-properties-you-need-to-be-familiar-with/ http://www.w3schools.com/css/css_image_transparency.asp http://www.w3schools.com/cssref/pr_background-image.asp http://ie.microsoft.com/testdrive/graphics/cssgradientbackgroundmaker/default.html http://www.w3.org/TR/CSS21/visufx.html http://www.barelyfitz.com/screencast/html-training/css/positioning/ http://davidwalsh.name/css-fixed-position   Create a flexible content layout. o This objective may include but is not limited to: implement a layout using a flexible box model; implement a layout using multi-column; implement a layout using position floating and exclusions; implement a layout using grid alignment; implement a layout using regions, grouping, and nesting http://www.html5rocks.com/en/tutorials/flexbox/quick/ http://www.css3.info/preview/multi-column-layout/ http://msdn.microsoft.com/en-us/library/ie/hh673558(v=vs.85).aspx http://dev.w3.org/csswg/css3-grid-layout/ http://dev.w3.org/csswg/css3-regions/   Create an animated and adaptive UI. o This objective may include but is not limited to: animate objects by applying CSS transitions; apply 3-D and 2-D transformations; adjust UI based on media queries (device adaptations for output formats, displays, and representations); hide or disable controls http://www.bloggedbychris.com/2012/09/19/microsoft-exam-70-480-study-guide/   Find elements by using CSS selectors and jQuery. o This objective may include but is not limited to: choose the correct selector to reference an element; define element, style, and attribute selectors; find elements by using pseudo-elements and pseudo-classes (for example, :before, :first-line, :first-letter, :target, :lang, :checked, :first-child) http://www.bloggedbychris.com/2012/09/19/microsoft-exam-70-480-study-guide/   Structure a CSS file by using CSS selectors. o This objective may include but is not limited to: reference elements correctly; implement inheritance; override inheritance by using !important; style an element based on pseudo-elements and pseudo-classes (for example, :before, :first-line, :first-letter, :target, :lang, :checked, :first-child) http://www.bloggedbychris.com/2012/09/19/microsoft-exam-70-480-study-guide/   Technorati Tags: 70-480,CSS3,HTML5,HTML,CSS,JavaScript,Certification

    Read the article

  • Can you Download the cmid.ctt File

    - by ArtistDigital
    Can you Download the cmid.ctt File Zong.com.pk http://203.82.55.30/websms/default.aspx?txt_Msg=your-name&txt_MNumber=033489667417&txt_Nick=your-name Still Waiting for Reply.... kindly more Developer to broke the Server expection function alphanumeric(alphane) { var numaric = alphane; for(var j=0; j 47 && hh<59) || (hh 64 && hh<91) || (hh 96 && hh<123)) { } else { return false; } } return true; } function charscount(msg, frm) { frm.num_chars.value = 147 - msg.length; // m = msg; } function moveDivDown() { var el = document.getElementById("chatwindow") st = el.scrollTop; el.scrollTop = el.scrollTop + 300 } function trim(str) { return str.replace(/^\s*|\s*$/g,""); } var XMLHttp; var XMLHttp2; /SEND TO SERVER/ function GetXmlHttpObject() { var objXMLHttp=null /* if (window.XMLHttpRequest) { objXMLHttp=new XMLHttpRequest() } else if (window.ActiveXObject) { objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") }*/ var ua = navigator.userAgent.toLowerCase(); if (!window.ActiveXObject) objXMLHttp = new XMLHttpRequest(); else if (ua.indexOf('msie 5') == -1) objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP"); else objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); return objXMLHttp } function updateChatWindow() { var txt_Msg, txt_mNumber, txt_Nick, myMessage txt_MNumber = document.getElementById("txt_MNumber").value txt_Msg = document.getElementById("txt_Msg").value txt_Nick = document.getElementById("txt_Nick").value txt_Nick = trim (txt_Nick) if (txt_Nick.length==0) { alert ("Please enter the Nick Name") document.getElementById("txt_Nick").focus() document.getElementById("txt_Nick").value="" return false; } if (!alphanumeric(txt_Nick)) { alert ("Please enter a valid alphanumeric Nick Name") document.getElementById("txt_Nick").value="" document.getElementById("txt_Nick").focus() return false; } if (txt_Msg.length==0) return false; if (txt_MNumber.length != 10) { alert ("Please Enter a 10 digit recipient mobile number") return false } if (!IsNumeric (txt_MNumber)) { alert ("Please Enter a valid 10 digit recipient mobile number") return false } document.getElementById("txt_Msg").value = "" document.getElementById("num_chars").value = "147" document.getElementById("txt_Msg").focus() myMessage = '' +txt_Nick + ' Says: ' + txt_Msg + '' document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML + myMessage moveDivDown() XMLHttp = GetXmlHttpObject() if (XMLHttp==null) { alert ("Browser does not support HTTP Request") return false; } var url="default.aspx?" url=url+"txt_Msg="+txt_Msg url=url+"&txt_MNumber="+txt_MNumber url=url+"&txt_Nick="+txt_Nick url=url+"&sid="+Math.random() XMLHttp.onreadystatechange=stateChanged XMLHttp.open("GET",url,true) XMLHttp.send(null) return false; } function stateChanged() { if (XMLHttp.readyState==4 || XMLHttp.readyState=="complete") { try { document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML+ XMLHttp.responseText moveDivDown() } catch (e){} } } /RECEIVE FROM SERVER/ function checkResponse() { XMLHttp2 = GetXmlHttpObject() if (XMLHttp2==null) { alert ("Browser does not support HTTP Request") return } var url="" url=url+"?r=C" url=url+"&sid="+Math.random() XMLHttp2.onreadystatechange=stateChanged2 XMLHttp2.open("GET",url,true) XMLHttp2.send(null) } function stateChanged2() { if (XMLHttp2.readyState==4 || XMLHttp2.readyState=="complete") { try { document.getElementById("chatwindow").innerHTML= document.getElementById("chatwindow").innerHTML + XMLHttp2.responseText moveDivDown() } catch (e){} //Again Check Updates after 3 Seconds setTimeout("checkResponse()", 2000); } } function IsNumeric(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; }

    Read the article

  • How to send web browser a loading page, then some time later a results page

    - by Kurt W. Leucht
    I've wasted at least a half day of my company's time searching the Internet for an answer and I'm getting wrapped around the axle here. I can't figure out the difference between all the different technology choices (long polling, ajax streaming, comet, XMPP, etc.) and I can't get a simple hello world example working on my PC. I am running Apache 2.2 and ActivePerl 5.10.0. JavaScript is completely acceptable for this solution. All I want to do is write a simple Perl CGI script that when accessed, it immediately returns some HTML that tells the user to wait or maybe sends an animated GIF. Then without any user intervention (no mouse clicks or anything) I want the CGI script to at some time later replace the wait message or the animated GIF with the actual results from their query. I know this is simple stuff and websites do it all the time using JavaScript, but I can't find a single working example that I can cut and paste onto my machine that will work in Perl. Here is my simple Hello World example that I've compiled from various Internet sources, but it doesn't seem to work. When I refresh this Perl CGI script in my web browser it prints nothing for 5 seconds, then it prints the PLEASE BE PATIENT web page, but not the results web page. So the Ajax XMLHttpRequest stuff obviously isn't working right. What am I doing wrong? #!C:\Perl\bin\perl.exe use CGI; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; sub Create_HTML { my $html = <<EOHTML; <html> <head> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="expires" content="-1" /> <script type="text/javascript" > var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } </script> <title>Ajax Streaming Connection Demo</title> </head> <body> Some header text. <p> <div id="response">PLEASE BE PATIENT</div> <p> Some footer text. </body> </html> EOHTML return $html; } my $cgi = new CGI; print $cgi->header; print Create_HTML(); sleep(5); print "<script type=\"text/javascript\">\n"; print "\$('response').innerHTML = 'Here are your results!';\n"; print "</script>\n";

    Read the article

  • jQuery validation plugin and .ajax

    - by FALCONSEYE
    So, I have a form where I load divs as I go asking for various user input and displaying some offers. I have the following: $("#calcPrice").click(function() { $("#invPricing").validate({ rules: { ... }, messages: {... } , submitHandler: function(form) { .... $.ajax({ }); $.ajax({ }); return false; } }); My problem is after validation, none of the ajax calls work. If I remove the validation methods (rules, messages, submitHandler), everything works fine. Can somebody tell me what I am missing here? thanks in advance. btw, these are the ajax calls: $.ajax({ dataType: "json", type: "get", url: <cfoutput>"#actURL#"</cfoutput>, data: formData+"&p_type=LOW&returnJSON=true", cache: false, success: function(result) { // fields to populate: $("#rent").val(result.RENT); $("#discount").val(result.DISCOUNT); $("#salesPrice1").val(result.SALESPRICE); $("#cashPrice1").val(result.CASHSALESPRICE); $("#tax1").val(result.SALESTAX); $("#payment1").val(result.PAYMENTS); } , error: function(xmlHttpRequest, status, err) { confirm('Error!' + err); } }); $.ajax({ dataType: "json", type: "get", url: <cfoutput>"#actURL#"</cfoutput>, data: formData+"&p_type=HIGH&returnJSON=true", cache: false, success: function(result) { // fields to populate: $("#rent").val(result.RENT); $("#discount").val(result.DISCOUNT); $("#salesPrice2").val(result.SALESPRICE); $("#cashPrice2").val(result.CASHSALESPRICE); $("#tax2").val(result.SALESTAX); $("#payment2").val(result.PAYMENTS); } , error: function(xmlHttpRequest, status, err) { confirm('Error!' + err); } }); I am basically displaying two offers one Low, one High.

    Read the article

  • Jquery Resizable Issue

    - by MrEnder
    Ok my windows are supposed to be resizable... the web site is http://opentech.durhamcollege.ca/~intn2201/brittains/labs/ my code is document.writeln('<object id="cursorObj" width="0" height="0" >'); document.writeln('<param name="movie" value="flash/cursor.swf" name="wmode" value="transparent">'); document.writeln('<embed id="cursorEmbed" src="flash/cursor.swf" width="0" height="0" style="position: absolute;" wmode="transparent">'); document.writeln('</embed>'); document.writeln('</object>');*/ var browser=navigator.appName; var frameWidth = ""; var frameHeight = ""; var d = new Date(); var year = d.getFullYear(); var date = ""; var menuCheck = false; var si = ""; var io = ""; var windowT = ""; var cursorObj = ""; var cursorEmbed = ""; var windowState = false; var windowBody = ""; var bgImage_JS = document.getElementById("bgImage"); var desktop_JS = document.getElementById("desktop"); var menuBar_JS = document.getElementById("menuBar"); var menuBarButton_JS = document.getElementById("menuBarButton"); var menuBarContainer_JS = document.getElementById("menuBarContainer"); var menuBarClock_JS = document.getElementById("menuBarClock"); var action1_JS = document.getElementById("action1"); var action2_JS = document.getElementById("action2"); var action3_JS = document.getElementById("action3"); var showdesktopButton_JS = document.getElementById("menuBarButtonShowdesktopInput"); var windowExitImage_JS = document.getElementById("windowExitImage"); /*if(browser!="Netscape") { windowExitImage_JS.style.top = "-25px"; }*/ function requestWindow(url) { if(windowState==false) { windowOpen(); requestWindowInput() } else if(windowState==true) { windowClose(); } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",url,false); xmlhttp.send(null); } function requestWindowInput() { document.getElementById('action1').innerHTML=xmlhttp.responseText; } function requestdesktop(url) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",url,false); xmlhttp.send(null); document.getElementById('desktop').innerHTML=xmlhttp.responseText; } requestdesktop('desktop.php'); function reset() { if (self.innerWidth) { frameWidth = self.innerWidth; frameHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientWidth) { frameWidth = document.documentElement.clientWidth; frameHeight = document.documentElement.clientHeight; } else if (document.body) { frameWidth = document.body.clientWidth; frameHeight = document.body.clientHeight; } /*cursorObj = document.getElementById("cursorObj"); cursorEmbed = document.getElementById("cursorEmbed");*/ if(browser!="Netscape") { bgImage_JS.style.top = 8 + "px"; bgImage_JS.style.left = 8 + "px"; desktop_JS.style.top = 8 + "px"; desktop_JS.style.left = 8 + "px"; menuBar_JS.style.top = (frameHeight - 45) + "px"; menuBar_JS.style.left = 8 + "px"; desktop_JS.style.width = "24px"; } bgImage_JS.style.width = (frameWidth - 21) + "px"; bgImage_JS.style.height = (frameHeight - 51) + "px"; desktop_JS.style.width = (frameWidth - 20) + "px"; desktop_JS.style.height = (frameHeight - 50) + "px"; menuBar_JS.style.width = (frameWidth - 20) + "px"; menuBar_JS.style.top = (frameHeight - 40) + "px"; menuBarClock_JS.style.left = (frameWidth - 100) + "px"; /*cursorEmbed.style.width = (frameWidth - 20) + "px"; cursorEmbed.style.height = (frameHeight - 20) + "px"; cursorEmbed.style.width = (frameWidth - 20) + "px"; cursorEmbed.style.height = (frameHeight - 20) + "px";*/ t=setTimeout('reset()',500); } function menuSize() { action3_JS.style.backgroundColor = "black"; action3_JS.style.color = "#C0C0FF"; action3_JS.style.border = "1px solid #C0C0FF"; action3_JS.style.width = "250px"; action3_JS.style.height = "400px"; action3_JS.style.padding = "5px"; if(browser!="Netscape") { action3_JS.style.top = (frameHeight - 452) + "px"; var winCheck = frameWidth - 1651; if(winCheck<=0) { action3_JS.style.left = 8 + "px"; } else { action3_JS.style.left = (frameWidth - 1672) + "px"; } } else { action3_JS.style.top = (frameHeight - 452) + "px"; var winCheck = frameWidth - 1672; if(winCheck<=0) { action3_JS.style.left = 8 + "px"; } else { action3_JS.style.left = (frameWidth - 1672) + "px"; } } //menuT=setTimeout('menuSize()',500); } function menu() { if(menuCheck==false) { var lab1 = "'lab1.php'"; var lab2 = "'lab2.php'"; var lab3 = "'lab3.php'"; var lab4 = "'lab4.php'"; var lab5 = "'lab5.php'"; var lab6 = "'lab6.php'"; menuSize(); action3_JS.innerHTML = '<input type="button" class="menuButtons" id="menuButton1" value="Lab1" onclick="requestWindow(' + lab1 + ')" /><input type="button" class="menuButtons" id="menuButton2" value="Lab2" onclick="requestWindow(' + lab2 + ')" /><input type="button" class="menuButtons" id="menuButton3" value="Lab3" onclick="requestWindow(' + lab3 + ')" /><input type="button" class="menuButtons" id="menuButton4" value="Lab4" onclick="requestWindow(' + lab4 + ')" /><input type="button" class="menuButtons" id="menuButton5" value="Lab5" onclick="requestWindow(' + lab5 + ')" /><input type="button" class="menuButtons" id="menuButton6" value="Lab6" onclick="requestWindow(' + lab6 + ')" /><input type="button" class="menuButtons" id="menuButtonShowdesktop" value="Show desktop" onclick="showDesktop()" />'; menuCheck=true; } else if(menuCheck==true) { action3_JS.style.backgroundColor = "transparent"; action3_JS.style.border = "0px solid #C0C0FF"; action3_JS.style.width = "0px"; action3_JS.style.height = "0px"; action3_JS.style.padding = "0px"; action3_JS.style.top = "0px"; action3_JS.style.left = "0px"; action3_JS.innerHTML = ""; //window.clearTimeout(menuT); menuCheck=false; } } function clearMenu() { action3_JS.style.backgroundColor = "transparent"; action3_JS.style.border = "0px solid #C0C0FF"; action3_JS.style.width = "0px"; action3_JS.style.height = "0px"; action3_JS.style.padding = "0px"; action3_JS.style.top = "0px"; action3_JS.style.left = "0px"; action3_JS.innerHTML = ""; menuCheck=false; //menuT=setTimeout('clearMenu()',500); } function showDesktop() { clearMenu(); action1_JS.style.display = "none"; action1_JS.style.backgroundColor = "transparent"; action1_JS.style.border = "0px solid #C0C0FF"; action1_JS.style.width = 0 + "px"; action1_JS.style.height = 0 + "px"; action1_JS.style.left = 0 + "px"; action1_JS.style.top = 0 + "px"; window.clearInterval(si); window.clearTimeout(windowT); windowState = false; } function windowSize() { action1_JS.style.backgroundColor = "black"; action1_JS.style.color = "#C0C0FF"; action1_JS.style.border = "1px solid #C0C0FF"; action1_JS.style.width = (frameWidth - 375) + "px"; action1_JS.style.height = (frameHeight - 200) + "px"; action1_JS.style.left = (frameWidth - 1500) + "px"; var winCheck1 = (frameWidth - 1500); if(winCheck1<=0) { action1_JS.style.left = (frameWidth - 850) + "px"; } winCheck1 = (frameWidth - 850); if(winCheck1<=0) { action1_JS.style.left = (frameWidth - 300) + "px"; action1_JS.style.width = (frameWidth - 50) + "px"; } action1_JS.style.top = (frameHeight - 750) + "px"; var winCheck2 = (frameHeight - 750); if(winCheck2<=0) { action1_JS.style.top = (frameHeight - 500) + "px"; } //windowT=setTimeout('windowSize()',500); $(function() { $("#action1").resizable(); }); } function windowOpen() { windowSize(); action1_JS.style.display = "none"; $("#action1").fadeIn(1300); setTimeout("requestWindowInput()", 100); windowState = true; clearMenu(); } function windowClose() { action1_JS.style.display = ""; $("#action1").fadeOut(1300); windowState = false; clearMenu(); setTimeout("windowOpen()", 1350); } function windowDragStart() { $(function() {$("#action1").draggable( {disabled: false} );}); } function windowDragEnd() { $(function() {$("#action1").draggable( {disabled: true} );}); } function windowExitMouseover() { document.getElementById("windowExitImage").src = "images/exit2.png"; } function windowExitMouseout() { document.getElementById("windowExitImage").src = "images/exit1.png"; } $(function() { $("#action1").resizable(); }); I'm trying to use $(function() { $("#action1").resizable(); }); to resize my #action1 div sorry for the long code =[ not sure whats breaking it is why I sent everything

    Read the article

  • jQuery AJAX call not working in Webkit

    - by Brian
    I've run into a strange issue with Webkit based browsers (both Safari and Chrome - I'm testing on a Mac) and I am not sure what is causing it. Here's a small script I've created that replicates the issue: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" language="javascript"> function doRequest() { document.test.submit(); $.ajax({ type: "GET", cache: false, url: 'ajax.php?tmp=1', success: doSuccess }); } function doSuccess(t_data,t_status,req) { alert('Data is: '+ t_data +', XMLHTTPRequest status is: '+ req.status); } </script> </head> <body> <form name="test" method="post" action="ajax.html" enctype="multipart/form-data"> <input type="file" name="file_1"> <br><input type="button" value="upload" onclick="doRequest();"> </form> </body> </html> ajax.php is: <?php echo $_REQUEST['tmp']; ?> This works as is on Firefox, but the XMLHTTPRequest status is always "0" on both Safari and Chrome. If I remove this line: document.test.submit(); then it works, but of course the form is not submitted. I've tried changing the form submit button from "button" to "submit", but that also prevents it from working on Safari or Chrome. What I am trying to accomplish is: submit the form call another script to get status on the file being uploaded via the form (it's for a small upload progress meter). Any help is really appreciated - I'm hopeful it is just a quirk I'm not familiar with. Thanks! Brian

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >