Questions tagged "javascript" (page No.1)

Trying to capture group in javascript regex (port from c#)

I have this regex var mregex = /(\$m[\w|\.]+)/g; string mstring= "$m.x = $m.y"; So basically capture each instance of $m.[+ any number of alphanumeric or . until another character or the end] I have this working in C# but I'm trying to port it over to javascript, so dropped the name capture. var match = ...

Trim URL using javascript

I'm making an ebay template for myself, and I want to use a name anchor to jump to different section on the page template. But Ebay adds something to the URL therefore breaking the name anchor. Since this seems to be Firefox related only, someone suggested that I need to ...

Javascript - kill white space in front of string

I making some server reguests and the server reply me with a string that has a lot of spaces in front of the string. the string is USERNAME EXIST I know how to use this: String.prototype.killWhiteSpace = function() { return this.replace(/\s/g, '');}; String.prototype.reduceWhiteSpace = function() { return this.replace(/\s+/g, ' ');}; but the first the first answer ...

How to strip wav header in either C#, JavaScript, or ActionScript?

It's been a fruitless attempt on my end. I've gotten to the point where I understand the difference between WAV and PCM, and my goal is to remove the WAV headers to get a RAW header-less PCM audio file. Does anyone have experience with the above? ...

Get URL parameters through POST method and javascript

How would you extract the URL parameters in javascript through a POST method? For example: localhost:8080/file.html/a/30/b/40 a and b would be keys while 30 and 40 would be the values for those keys Thanks in advance! ...

jQuery.ajax: How do I get the data to send easily?

I have lots of forms on a project I'm working on. All the forms pretty much go through AJAX. $.ajax({ type: "GET", cache: false, url: $(this).attr("action"), ...

binding native android java to javascript events offer better performance?

I use phonegap. will binding javascript events to native android (java) code offer faster event performance? eg. lets say for something like 'touchstart' etc. If so, what code do I use to achieve this? your help is appreciated. thanks ...

Making knockout subscribers off for a model and turn it on back again

I'm new to knockout and don't know if I'm doing this right at all or not I have a shopping cart editor, just like knockout live examples, except the fact that I want to have a more advanced product selector. my products have actually two kind of code which user must ...

Persist browser client javascript/HTML data without cookies

I have a web site I created that uses Python, HTML, and javascript. The main home page has 19 editable variable fields. If I change any of these field values, and then leave the page (click on one of my other link tabs), and then return to my home page, ...

Is it possible to get info from a file on the client side without uploading the file?

I am allowing my users to upload mp3 files just so I can read the metadata and extract the Song Title and Singer Name. At the moment I am uploading the file and using getId to read the meta data. The upload of course takes a lot of resources ...

How to lightbox upon clicking on next button

How do i lightbox or change background color upon clicking on next or previous button inside a slider, similar to show Mashable does : http://mashable.com/2012/07/31/outlook-hotmail-review/ ...

How do I ask jQuery to look at the value of multiple ID's

This is somewhat of a continuation of an earlier question. I have figured out how to use a selector to point to a specific ID and look for a value="", and then fill that with a red background... i.e. - $('[id^="f04"][value=""]').css('background-color', 'red') What I need to do now is build ...

Is it possible to include multiple modes in CodeMirror 2?

Is it possible to include two or more modes in the CodeMirror 2 instance? e.g. var editor = CodeMirror.fromTextArea(document.getElementById("editor"), { value: "Hello World", mode: "css", "html", "javascript" }); ...

Convert a JavaScript Array into a JSON object

I'm modifying a Mail Merge project in Google Apps Script. The problem I'm facing is how to make the email body display inline images. Currently, all inline images present in the original email template are displayed as attachments after GmailApp.sendEmail() is called. My guess is that the inline images can ...

changing google maps marker position

I want to update marker position by text field value (adress) And I got functions <script type="text/javascript"> var mapa; var marker; function initialize() { if (GBrowserIsCompatible()) { mapa = new GMap2(document.getElementById("mapa")); mapa.addControl(new GLargeMapControl()); mapa.addControl(new GMapTypeControl()); mapa.addControl(new GOverviewMapControl(new GSize(140,110))); var center = new GLatLng({/literal}{if $mapa.lat ne "" && $mapa.lat ne "a"}{$mapa.lat}{else}51.919438{/if}, {if $mapa.lng ne "" && $mapa.lng ne "a"}{$mapa.lng}{else}19.145136{/if}); mapa.setCenter(center, {if $mapa.zoom ...

impromptu isnt closing dialog when close method called inside function

I am stuck for 4 hours with such code: $.loader = function (msg) { jQuery.prompt.close(); $.prompt(msg, { buttons: { }, show: 'fadeIn', promptspeed: 50, overlayspeed: 'fast' }); } function my_function() { jQuery.prompt.close(); $.loader('saving..'); $.ajax({ type: "POST", ...

javascript - connect two variables

I have a few (hundred) variables: var image1 = 'xxxx'; var image2 = 'yyyy'; var image3 = 'zzzz'; etc... I'm trying to use a while loop to incorporate these images in a function like so: i = 0; while (i<100) { $("#somediv").append(image + i); } I understand why this would not work, ...

Jquery/PunBB Replace Number with String

Using PunBB on Forumotion the idea was to use the Points system to replace the number of points displayed with a string of text. Using a span class I first defined a class 'honorpoints' around the code that shows the number of points a user has. <span class="honorpoints"><!-- BEGIN profile_field -->{postrow.displayed.profile_field.CONTENT}<!-- ...

« Previous12345678910 ... 1223412235Next »Show All