JQuery :: Cross Port Library Call?
May 13, 2009
I have created a payment system using Jquery. The problem I run into is when I move from http to https. I get the following error: Error: [Exception... "Access to restricted URI denied" code: "1012"
[Code]...
View 3 Replies
ADVERTISEMENT
Feb 5, 2009
You can use it for your own purposes and change it.SoftXPath library has two methods for loading xml:
1) load("myxmlfile.xml")
2) loadXML("<root><name country='israel'>SoftXML</name><name country='usa'>Microsoft</name></root>")
SoftXPath library has three public properties:
DefaultNameSpace - Use this property when there is namespace in your xml document
if(SoftXPath.LoadedXML) - Use this property to check if xml string was loaded
if(SoftXPath.Loaded) - Use this property to check if xml document was loaded
SoftXPath library has single method for querying xml document using XPath:
selectNodes(xpath expression)
this method returns array of objects including tag name and text content
I have tested this script in IE,FireFox,Mozilla,Opera
Code:
// SoftXPath source code
function SoftXpath(){
function completeLoad(){[code]...
View 1 Replies
View Related
Jun 19, 2007
We have a javascript that is vulnerable to XSS because the input to
the script is not being checked for strings such as "javascript",
"eval", "script" etc. I have seen some snippets of code here and
there on how to check the strings but I have not yet found a
comprehensive js library that will clean user input of all offending
characters. What complicates it is that phishers can encode characters
to bypass the usual amateurish attempts to clean strings of offending
characters.
Any js libraries or resources out there anywhere?
View 1 Replies
View Related
May 26, 2009
I want to make AJAX call to specific funtion in library. Is there a way not to create new file for this?
View 5 Replies
View Related
Apr 8, 2010
I am using GreaseMonkey to load jQuery 1.3.2 (there is a bug with the latest version of jquery and GM) and jQuery UI 1.8.0.I am using jQuery via GM to manipulate the GUI of a content management system. This CMS uses its own JS library to dynamically add stuff to the dom.
Question:How can I target a dom element that was added to the dom via this other JS lib?In other words, the CMS will add a div to the dom, and I am not sure how to tell jquery to wait for these elements to "be there" before applying the jquery goodness. Specifically, I would like to do this:
$(function() {
$('#zen1227').resizable();
});
But "#zen1227" does not "appear" until later via this other JS library.
View 4 Replies
View Related
May 25, 2010
I am recentlyexperiencinga problem with .ajax calling cross domain asp.net webservice. It started working fine, until the data returned from server is becoming too big and suddenly the ajax call caused errors, if i reduce the data length then the error went away. After doing some debug, i have identified the problem being the callback was inserted into the returned data.
[Code]...
View 6 Replies
View Related
May 18, 2010
Is it possible to use $.ajax to call an external web service directly, or do I need to write a dot net server-side wrapper to consume the web service, then call the wrapper from jQuery ?
I have attempted a direct call as shown below, which works fine in IE but generates an error in Firefox, which I presume relates to the cross-domain scripting issue.
$.ajaxSetup({ cache: false });
View 2 Replies
View Related
May 4, 2011
I trying to make a call to an external domain using $.ajax() and it WORKS, the server receives the call, but the response in firebug errors out in jquery.js line 7760. I've been beating my head at this all day and don't feel like I've made it much further.
I suspect it has something to do with the dataType or type of the request. But I've tried all kinds of things from POST to GET to JSONP in the type. For dataType, I've also tried "html", "text", "xml", "json", and even some combos of "text html" but no success.
[Code]...
View 13 Replies
View Related
Jul 1, 2011
I want to bind a hook to objects member variable change event i.e. lets say I have object:
var obj { var1 : 1,
var2 : 2,
var3 : 3
};
I want to call "Magical" function like this:
onVariableChange(obj, "var1", function(obj, varname, old, new) {
alert("Variable " + varname + " changed from " + old + " to " + new);});
And after this function call every time obj.var1 is set to some value have my callback function called
I found something in internet: [URL]. Its cool but:
-It is changing Object-s prototype
-It is not working under IE 5, 6, 7, 8, 9, 10, 11, 12....
I've changed it a little bit and instead of adding to Object class prototype I'm adding it as member to any object which needs this hook. But IE still doesn't work. Is there any known cross-browser solution for this? I remember there was a jQuery upcoming project which would allow users to bind object to form and by changing one other will change automatically I wonder whats that project name and how they change input value when object member value changed.
View 2 Replies
View Related
Jun 16, 2011
To make cross domain calls when json is required (JSONP) is easy
Code:
$.ajax({
url:"testserver.php",
dataType: 'JSONP',
success:function(json){
[Code]....
I see the XML comming in as a string argument of 'myCallback', but ist never called. Also 'success' is never called!
View 3 Replies
View Related
Apr 9, 2009
I'm writing a web page, which should interact with pages on another server using an iFrame. I want to use a form on the parent page to post to the URL on the iFrame and capture the response, without reloading the parent page.
Here are the details:I have a FORM on the parent JSP page, with some session data in hidden fields. The point to note is that the whole session data is on the client side, in encrypted form. This data should be posted to the server for each request, synchronous or asynchronous.Now, I need to call an application on a server on a different domain. For this purpose, I am using an iFrame. The session data in the parent page should also be passed to the application in the iFrame.
View 2 Replies
View Related
Nov 3, 2010
I know about the same-origin policy and that one of the only ways to load data from a cross-domain is to load it as JSON. However, all I am trying to do is access data from a server on another port (which I believe the browser still treats as cross-domain). I need to do this because the server my application is on is a map server and the other server (Apache) is the only one that can handle php scripts. I have also tried out the plug-in from [URL] and while it works when I do $('#phpContent').load('http://www.google.com'); it doesn't work when I try $('#phpContent').load('http://localhost:80/mapScripts/getFiles.php'); I have also tried$.get('http://localhost:80/mapScripts/getFiles.php', function(data) { $('#phpContent').html(data); });
So here I am breaking my brain and do not know what else to attempt.
View 1 Replies
View Related
Jun 21, 2010
Hides the element by sliding it down.
$("div").click(function () { $(this).hide("slide", { direction: "down" }, 1000); });
I am new to Jquery. How do I reverse this code to slide element into viewport as opposed to slide out of view port. This is the link to the effect [URL]. What I want to do is the element will be hidden originally on loading the page and then slides into view with a click anywhere on the page, an anchor or after a few seconds.
View 1 Replies
View Related
Jun 18, 2009
Is there any way to resize an iframe dynamically to the height of its content that works cross browser and works when the iframe content is on another domain than the main page (I have access to both pages, so code can be put in either) Also, it must resize when links in the iframe are clicked (ie when a new page within the iframe is loaded)
View 1 Replies
View Related
May 27, 2011
Simple question really. The cross fade option used by default with cycle is not a linear one...it looks like it uses some kind of S curve because during the crossfade animation the background (meaning the area behind the images being cross-faded) becomes visible. Example screenshot taken mid-transition. The pink should never be visible behind the grey, but it is:
[Code]...
at the moment, which is leading to background visibility. Is there another fx option I should be using?
View 4 Replies
View Related
Sep 16, 2005
Is JavaScript able to send/listen for data on a specific port? I'm seeking
a solution to real time data interaction with my web server that doesn't
require refreshing the page. I.e., a chat room, where the data can be
broadcast from the server arbitrarily and displayed by the client
browser(s). To accomplish the data transmission can I use JS, or do I need
to augment my client-side platform to something like Java, et al?
View 1 Replies
View Related
Nov 7, 2005
Basically, I want to have a javascript that will watch for data coming
in on a specific port - like HTTP on port 80, etc. Is this at all
possible with pure javascript?
View 3 Replies
View Related
Aug 17, 2009
I'm a newbie to javascript programming and I'm seeking on a solution on how to connect to a tcp port using javascript. Basically, we have phone server that is constantly streaming XML data on port 1024 (serverIP:1024). I've ran a packet sniffer and was able to gather the elements and attributes for the XML data that the server is streaming. Now, I have a test XML parser which works with the XML document using the elements and attributes i've gathered from the packet sniffer. Is there a way for me to connect to the TCP port i've mentioned using javascript and incorporate it with the XML parser that I have. code...
View 3 Replies
View Related
Aug 5, 2009
I am planning to use a USB barcode scanner and use web browsers as my interface.
Is it possible to parse the USB port via javascript? (or any client-side languages)
View 1 Replies
View Related
Aug 31, 2010
How to do serial port communication using Javascript?
View 2 Replies
View Related
Mar 30, 2009
I have been directed from .NET section to this section. My original post and question are here. forums.devshed.com/net-development-87/asp-net-how-to-send-data-to-parallel-port-600691.html
Is it possible to send data to parallel port using javascript?
View 2 Replies
View Related
Dec 7, 2002
Okay, this an attempt to port PHP's date() function as much as possible to JavaScript. Could use some refactoring though. Any critique, comments, appraisal and any other opinion is very welcome. Feel free to discuss and also take a look at beetles code here: http://www.codingforums.com/showthread.php?s=&threadid=11069
Oh, and the date() function is described here: http://www.php.net/manual/en/function.date.php
Date.prototype.monthNames = new Array(
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
);
Date.prototype.dayNames = new Array(
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
);
Date.prototype.format = function (formatStr) {
var heap = formatStr.split("");
var resHeap = new Array(heap.length);
var escapeChar = ""; // you can change this to something different, but
// don't use a character that has a formatting meaning,
// unless you want to disable it's functionality
// go through array and extract identifiers from its fields
for (var i = 0; i < heap.length; i++) {
switch(heap[i]) {
case escapeChar:
resHeap[i] = heap[i+1];
i++;
break;
case "a": // "am" or "pm"
var temp = this.getHours();
resHeap[i] = (temp < 12) ? "am" : "pm";
break;
case "A": // "AM" or "PM"
var temp = this.getHours();
resHeap[i] = (temp < 12) ? "AM" : "PM";
break;
case "d": // day of the month, 2 digits with leading zeros; i.e. "01" to "31"
var temp = String(this.getDate());
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "D": // day of the week, textual, 3 letters; i.e. "Fri"
var temp = this.dayNames[this.getDay()];
resHeap[i] = temp.substring(0, 3);
break;
case "F": // month, textual, long; i.e. "January"
resHeap[i] = this.monthNames[this.getMonth()];
break;
case "g": // hour, 12-hour format without leading zeros; i.e. "1" to "12"
var temp = this.getHours();
resHeap[i] = (temp <= 12) ? temp : (temp - 12);
break;
case "G": // hour, 24-hour format without leading zeros; i.e. "0" to "23"
resHeap[i] = String(this.getHours());
break;
case "h": // hour, 12-hour format; i.e. "01" to "12"
var temp = String(this.getHours());
temp = (temp <= 12) ? temp : (temp - 12);
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "H": // hour, 24-hour format; i.e. "00" to "23"
var temp = String(this.getHours());
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "i": // minutes; i.e. "00" to "59"
var temp = String(this.getMinutes());
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "I": // "1" if Daylight Savings Time, "0" otherwise. Works only on the northern hemisphere
var firstDay = new Date(this.getFullYear(), 0, 1);
resHeap[i] = (this.getTimezoneOffset() != firstDay.getTimezoneOffset()) ? (1) : (0);
break;
case "J": // day of the month without leading zeros; i.e. "1" to "31"
resHeap[i] = this.getDate();
break;
case "l": // day of the week, textual, long; i.e. "Friday"
resHeap[i] = this.dayNames[this.getDay()];
break;
case "L": // boolean for whether it is a leap year; i.e. "0" or "1"
resHeap[i] = (this.getFullYear() % 4) ? false : true;
break;
case "m": // month; i.e. "01" to "12"
var temp = String(this.getMonth() + 1);
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "M": // month, textual, 3 letters; i.e. "Jan"
resHeap[i] = this.monthNames[this.getMonth()];
break;
case "n": // month without leading zeros; i.e. "1" to "12"
resHeap[i] = this.getMonth() + 1;
break;
case "O": // Difference to Greenwich time in hours; i.e. "+0200"
var minZone = this.getTimezoneOffset();
var mins = minZone % 60;
var hour = String(((minZone - mins) / 60) * -1);
if (hour.charAt(0) != "-") {
hour = "+" + hour;
}
hour = (hour.length == 3) ? (hour) : (hour.replace(/([+-])(d)/, "$1" + 0 + "$2"));
resHeap[i] = hour + mins + "0";
break;
case "r": // RFC 822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200"
var dayName = this.dayNames[this.getDay()].substr(0, 3);
var monthName = this.monthNames[this.getMonth()].substr(0, 3);
resHeap[i] = dayName + ", " + this.getDate() + " " + monthName + this.format(" Y H:i:s O");
break;
case "s": // seconds; i.e. "00" to "59"
var temp = String(this.getSeconds());
resHeap[i] = (temp.length > 1) ? temp : "0" + temp;
break;
case "S": // English ordinal suffix for the day of the month, 2 characters; i.e. "st", "nd", "rd" or "th"
var temp = this.getDate();
var suffixes = ["st", "nd", "rd"];
var suffix = "";
if (temp >= 11 && temp <= 13) {
resHeap[i] = "th";
} else {
resHeap[i] = (suffix = suffixes[String(temp).substr(-1) - 1]) ? (suffix) : ("th");
}
break;
case "t": // number of days in the given month; i.e. "28" to "31"
resHeap[i] = this.getDay();
break;
/*
* T: Not implemented
*/
case "U": // seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
// remember that this does not return milisecs!
resHeap[i] = Math.floor(this.getTime() / 1000);
break;
case "w": // day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)
resHeap[i] = this.getDay();
break;
case "W": // ISO-8601 week number of year, weeks starting on Monday
var startOfYear = new Date(this.getFullYear(), 0, 1, 0, 0, 0, 0);
var firstDay = startOfYear.getDay() - 1;
if (firstDay < 0) {
firstDay = 6;
}
var firstMonday = Date.UTC(this.getFullYear(), 0, 8 - firstDay);
var thisDay = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate());
resHeap[i] = Math.floor((thisDay - firstMonday) / (1000 * 60 * 60 * 24 * 7)) + 2;
break;
case "y": // year, 2 digits; i.e. "99"
resHeap[i] = String(this.getFullYear()).substring(2);
break;
case "Y": // year, 4 digits; i.e. "1999"
resHeap[i] = this.getFullYear();
break;
case "z": // day of the year; i.e. "0" to "365"
var firstDay = Date.UTC(this.getFullYear(), 0, 0);
var thisDay = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate());
resHeap[i] = Math.floor((thisDay - firstDay) / (1000 * 60 * 60 * 24));
break;
case "Z": // timezone offset in seconds (i.e. "-43200" to "43200").
resHeap[i] = this.getTimezoneOffset() * 60;
break;
default:
resHeap[i] = heap[i];
}
}
// return joined array
return resHeap.join("");
}
View 3 Replies
View Related
Apr 6, 2009
I am working on a robot project, that is required to create a website to control the robot via serial port.. The website is plainly html, no linking to database is needed...
I have no idea how and what language to use and can JavaScript communicate with serial port? and how?
View 2 Replies
View Related
Oct 28, 2010
I have got this xml file which has a background params which is <background>igmp:
{theme.background_video_ip}:1234</background>.
I have done the validation to check if the igmp protocol is used like this
if (clientSpecificData.background.substr(0, 7) == "igmp:") {
Right now I am trying to find out how I can use regular expressions to check whether a port number is used at the end.
View 2 Replies
View Related
Nov 11, 2011
I'm trying to find the position of an element with respect to the view port area. So, when the user scrolls the page down, I want to know the x and y positions of the element with respect to the viewing (view port) area.
The overall goal is to know exactly where on the element this user clicked.
View 4 Replies
View Related
May 14, 2011
I am reading the book JQuery Novice To Ninja. I can upload the examples to mozzilla and they work but I down loaded the library to my folder and I wrote out the examples myself and put them in the same folder so I can get the practice and they will not work the code is exactly the same as the book I do not understand.
View 1 Replies
View Related