javascript

How do i call methods of custom jquery plugin from my own plugin?

I just created my own plugin and i am trying to call another plugin function from it. So i have in my code : <script src='jquery.js'> <script src='some_other_plugin.js'> <script src='my_plugin.js'> So when in my plugin i am trying to call some_other_plugins function through $jQuery object - it says that there is no such function... Ho...

problem fetching a jsp page using curl

I'm using LIVE HTTP headers to sniff the HTML traffic and to mimic it using curl. The page I'm trying to get is a .jsp and I noticed that some data has been added to the cookie. I'm using the cookie I retrieved when log in to the site. This is the link: https://direct.orange.co.il/selfservice/info/notLoggedUser/notLoggedIn.jsp?loginTo...

How to use a variable in Google Analytics' Custom Variable

I'm trying to track a particular section of links on my page. I want to know what is clicked, so I'm trying to set up a click handler with jQuery to register a custom variable with Google Analytics, but it's not working. Here's my code: <!--Google Analytics--> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_s...

Remove a specifc inline style with Javascript|jQuery

Hello, I have the folowing code in my html: <p id='foo' style='text-align:center; font-size:14pt; font-family:verdana; color:red'>hello world</p> and that in my external css: #foo{ font-size:11pt; font-family:arial; color:#000; } I want to remove all "font-size" and "font-family" in the "style" atribute, but not the "color" and oth...

Drop Box Like StackOverflow tag chooser

i need help on coding javascript to detect the up and down arrow key hits and do an event on each key hit, without changing the cursor position of a focused textfield kinda like the stack overflow tag chooser Thanks again for any help ...

Is it possible to make "password" validation without refreshing a window?

Hello again, I've made a simple web application where a lot of things is done without refreshing a window. Now I faced a problem which I haven't realized before. If I won't find a solution, I'll have to redesign the whole app which will take a lot of time and probably kill some coolness of using it. Ouch. Ok, back to the problem. To re...

Set focus in TextBox after postback.

I have a simple page where I want to filter a ListBox based upon a value(s) in a textbox - both are in an UpdatePanel. This works correctly, however, after the postback the textbox had lost focus...so I set focus back in the page_load. Then I noticed that the cursor was now at the beginning of the text when I want it at the end so the us...

Web browser plugin for jquery performance optimization

Attempting to improve the perforance of my jquery - so step 1 for me is to optimize my selectors. I have been using jsperf.com which has been helpful but is there any web browser plugin that I can use that will do similar as jsperf? ie. I can enter several different selectors and it tell me which is the slowest etc or the timing each sel...

Is it possible to get an asp.net 'OnClicked' callback in javascript to call a function in a web control?

Title says it all, it does seem like it wouldn't be possible since callback functions seem to be page specific but in case it's possible I'd like to do that. ...

return folders from url

I am looking to write a piece of javascript that will do the following: Look at current url and return any folders in the url ie: http://localhost/folder1/page.aspx returns -> /folder1/ http://localhost/page.aspx returns -> / Any help? ...

insert content to already inserted content

Hi all, well, I'm stuck and hope that you can help. I created a text-example and put it to the end of the post. Thank you in advance. On a site there are e.g. 50 entries - like comments. Some p-elements in some of those entries are containing a special text. This is just a snippet how I get the special text. $("p:contains('special tex...

3rd party applications inside iFrames?

I am about to build a web application and I want to allow other developers extend it with their own applications. Should I do this with iFrames like Facebook? Is this a good practice? Are there other alternatives that let other developers extend my application (that is for the user it looks like it's from my application). To be speci...

Feeding multi-line string value to jquery methods

How do I feed string variable holding multiline value in it to jquery method like prepend? I need it to construct a form pass by drupal search module like - $('#divsearch').prepend('<?php print $search_box; ?>'). Thanks a bunch. ...

jQtouch + Phonegap: Document head setup

Hi there, I've recently built a webapp using jQTouch & packaged in PhoneGap (both latest versions). I'm now attempting to optimise the app, and was hoping to get some information on how to correctly setup the of the document. Currently I simply have the jQTouch javascript (no phonegap.js), and it seems to package and run ok on the ip...

Generate rsa keypair client-side (on the browser)

Hi! I need to know how to generate a rsa keypair on the cliente-side. My system has to send encrypted data through the server and I have to ensure that the server cannot decrypt the data. So the Private/Public keypair cannot be generated on the server-side. Any knowledge regarding this? Thank you! ...

Lazy loading images how...

Hello... I am developing an eshop .At products page based on category i putted some javascript based filtering. However a problem arises if a category has a lot of products. This link has something similar i do ... http://www.snowandrock.com/sunglasses/snowboard/fcp-category/list?resetFilters=true How ever this page is painfully slow a...

Executing 'realtime' javascript without hanging the browser

Hi! I'm trying to write a simple music-sequencer in Javascript. Sounds will be played by SoundManager2 I quickly realised that setTimeout and setInterval are useless for this kind of timing. Their accuracy is simply not good enough. So what I am trying instead is this: Create a queue of sound-events (a 2d array [ note, time ] ) P...

Problem with JS jQuery AJAX

Hi all, i have a problem with my code. function fnFormatDetails ( oTable, nTr ) { var aData = oTable.fnGetData( nTr ); var sOut = ""; var ajax = $.ajax({ url: "/wemi/mediaplaner/show?id="+aData[1], success: function(data) { //return data; //return sOut = data; //con...

JQuery UI Click call works on local machine but not when published to server - also using CakePHP

I have some javascript that looks like this: $('.resultitem').click(function(event){ alert('check this gets called'); location.href='viewinfo/'+$(this).attr('rel'); }); this code works fine on my local machine but after uploading to the server it doesn't seem to get called at all. Can anybody help me un...

Javascript in Safari not always running

Hey Guys, Am having an issue with Safari. I have a basic script using jQuery that makes some changes to a form field and adds some behaviours to it. When I run this script on using the document ready method it's fine in Firefox but in Safari it doesn't always run the initial changes. I can hit refresh and get it running fine 4/5 times, ...