To create a digital signature with the client certificate in javascript, there was a function: crypto.signtext() that doesn't work anymore
What is the easiest way to do this now?
I want to send a datetime.datetime object in serialized form from Python using JSON and de-serialize in JavaScript using JSON. What is the best way to do this?
In javascript is there a good(i mean built in) way that i can find whether element if array of not ? one simple i can see is as follows but i don't like it
if(ele.push){//its array it has push method}
I mean i would like know if something like below exists
function x(ele){ if(isArray(ele)){//dosomething} }
Hi,
Could anyone point me in the right direction to parse an ID from a Vimeo URL in Javascript?
The URL will be entered by a user so I will need to check that they have entered it in the correct format.
I need the ID so that I can use their simple API to retrieve video data.
Any help appreciated.
Hello!
This is my first post!
I have a question about javascript...here is my code:
<html>
<head>
<title>Geolocation Demo</title>
</head>
<body>
<h1>Geolocation Demo</h1>
<p>Latitude: <span id="lat">0.00</span> Longitude: <span id="lon">0.00</span> City: <span id="city">Loading...</span></p>
<p><a id="city_link" href="http://tinygeocoder.com/" target="_blank">View City</a></p>
<p><a id="gmaps_link" href="http://maps.google.co.uk/" target="_blank">View on Google Maps</a></p>
<script language="javascript">
// show the position on the page and make a google maps link
function showPosition(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
document.getElementById("lat").innerHTML = lat;
document.getElementById("lon").innerHTML = lon;
var gmaps_url = "http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=" + lat + "+" + lon;
var city_url = "http://tinygeocoder.com/create-api.php?g=" + lat + "," + lon;
document.getElementById("gmaps_link").href = gmaps_url;
document.getElementById("city_link").href = city_url;
}
</script>
</body>
</html>
As you can see, this script target my geolocation. Specifically, Lat and Lon are working perfectly. In addinition, i want to display and region info (like city). So, i found a website which i provide the coordinates and it returns me a region name. My question is if i can display the name of region without clicking the link "View city" but in the field "city"...is it possible to pass the webpage content (http://tinygeocoder.com/create-api.php?g=" + lat + "," + lon;) into my webpage? The content of this page is only the name as i said...no html tags!
Thank you!
Hi Folks !
So I am having an issue on my entrepreneur business opportunity rating matrix :
I would like the radio buttons to stay on the same line.
The problem is that I don't know how I should process because if I give a fixed minimum width for the cell, i'm not sure it will display properly on other browsers, and if the cell is to big I loose the alignment of the radio buttons.
Do you guys have a CSS/Javascript (jQuery) trick that would fix this ?
Thank you
I am fiddling around with JBOSS's Web Services, and I have created the following:
http://127.0.0.1:8080/IM/TestService?wsdl
Now I need to access Web Methods from that Web Service from JavaScript.
Say I have a web method named foo in TestService, how do I make an ajax call to it?
I tried accessing the method via http://127.0.0.1:8080/IM/TestService/foo, but I'm getting an HTTP Status 404.
Long and short of the story is, whilst reading John Resig's blog (specifically http://ejohn.org/blog/javascript-trie-performance-analysis/) I came across a line which makes absolutely no sense to me whatsoever. Essentially it boils down to
object = object[key] = something;
(this can be found in the first code block of the article I've linked.)
This has proven rather difficult to google, so if anyone can offer some insight / a good online resource for me to learn for myself, I'd much appreciate it.
Hi,
Let us say I have a restful web service which can deal with DTOs in json format to perform a CRUD operation.
Let us also say I use jquery in an unobtrusive way to serialise my form at the frontend using:
JSON.stringify
What can I do to ensure that everything works even if JavaScript is switched off?
Thanks.
Best wishes,
Christian
Hello,
I am passing a lot of data between PHP and JavaScript. I am using JSON and json_encode in php, but the problem here is that I am passing a lot of numbers stored as strings - for example, numbers like 1.2345.
Is there a way to pass the data directly as numbers (floats, integers) and not have to convert it to ASCII and then back?
Thanks,
For example, here is a string representing an expression:
var str = 'total = sum(price * qty) * 1.09875';
I want to extract variables (i.e., 'total', 'price' and 'qty' but not 'sum' since 'sum' is a function name) from this expression. What is the regexp pattern in javascript? Variable name consists of letters, digits, or the underscore, beginning with letters or the underscore.
Hello, this is quite a simple question hopefully.
Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to scrap flash and use JavaScript and jQuery. Now, as long as the XML file is at a readable URL I should be able make an AJAX request for the file and use it. Is that correct?
Many thanks
HI
I want to execute one script within my php and that javascript will give me output as HTML and i want to display that output but i want to do this all within PHP so please tell me which function should i use
Thanks in advance :)
Is here a convenient way to quote a large block of HTML that has both single and double quotes in JavaScript? Is there anything like a HERE-doc <<EOF, a multi-quote character """, or custom delimiters q{}?
Any creative or inventive solutions to this problem?
I'm trying to find something like this: http://coffeescripter.com/code/ad-gallery/ that is controlled by an xml file that can simply contain the image location, thumbnail location and the text for title/description. Has to be pure jquery or javascript though - no flash based stuff.
I've found loads of great components but can't find one that is controlled by XML. Anyone happen to have seen one around anywhere please?
Hi All
I have a modal popup as (lightbox etc.). If i want to add java applet into the modal popup via javascript i encounter a problem that is Java Applet don't display propperly sometimes dont' everytime. I tried to solve it setTimeout methot but it didn't solve :( Do you have a suggestion this issue? Thanks.
I have a checkbox which in some cases may be disabled and checked using javascript, i.e:
var cbTest = document.getElementById("CheckBoxTest");
cbTest.disabled = true;
cbTest.checked = true;
However, when sending a postback, CheckBoxTest.Checked is false on the server side.
Is it possible to disable the checkbox and still have the server side recognize it as checked?
Clicking on the image should show div near it (.show() in jQuery).
But how can i attach div to that image? Is it done with pure css, or javascript?
I tried several "position:absolute", but can't attach it near image.
How it should be done?
I would like to extract some text between two points in a string, in Javascript
Say the string is
"start-extractThis-234"
The numbers at the end can be any number, but the hyphens are always present.
Ideally I think capturing between the two hypens should be ok.
I would like the result of the regex to be
extractThis
Hi ,
i have few numbers like
0011,0101,0123,1234,5245,0052,3265,0047,0124
How replace prefix zero only,
like no number should start with zero ,
exactly like
0011 should be 11 ,
0101 should be 101 ,
0123 should be 123
How to do this ?
Is ther any javascript function there ,
Thanks
HI ,
i am having a table like
<table id="toc" class="toc" border="1" summary="Contents">
</table>
i am trying to delete the entire table using javascript.how to do this??
Hi,
I am trying to format this line of code in my popup window, but i am facing unterminated string literal error.
Can somebody please tell me how best I could format this.
window.setTimeout("winId.document.write('<script src="../js/tiny_mce/tiny_mce.js" type="text/javascript"></script>\n')", 10);
Also point out if this particular line of code would work fine in the popup?
How to check in C# if a javascript file is already loaded on to the page? Let's say I have a user control in a different namespace that I load on to a page. I would like to see if a script file doesn't exist before I register it with the scriptmanager.
Whats the easiest way in javascript to replace ABC, DEF, GHI with XYZ in the following strings
http://z.site.com/z/ABC/z/z.html
http://z.site.com/z/DEF/z/z.html
http://z.site.com/z/GHI/z/z.html