jquery

sIFR encoding the non-breaking space char - %20

Gotta be something I'm doing wrong when converting the ttf with OpensIFRr, but I'm seeing %20 chars for non-breaking spaces in all sIFR'd text. I'm using the jQuery sIFR plugin (3.04) with the following: <div><h1>My Example Text</h1></div> ... <script type="text/javascript"> <!-- var $j = jQuery; $j(...

jQuery JSP Capture element being set after action of submit to change the CSS

I have a JSP which has jQuery and wanted to change the action message CSS on successful submit. So I have a page that a user enters info into, hits submit and then a span tag with the class actionMessage or actionError displays at the top of the page (After submit). Wanted to know if I could check for the element after page submit and a...

How to query an XML string via DOM in jQuery

Hi. I would like to take a string and treat it as XML. Then I will be able to query with DOM via the jQuery.find. Everything was working fine in Firefox, but I realized this is not working in IE. I am doing this: var t = "<div><outer><inner>abc</inner><inner>def</inner></outer></div>"; alert("[" + $(t).find("outer").html() + "]"); ...

jQuery .load() call doesn't execute javascript in loaded html file

This seems to be a problem related to Safari only. I've tried 4 on mac and 3 on windows and am still having no luck. What I'm trying to do is load an external html file and have the Javascript that is embedded execute. The code I'm trying to use is this: $("#myBtn").click(function() { $("#myDiv").load("trackingCode.html"); }); ...

SWF doesn't change its text changed dynamically via jQuery and C# 3.0

Hi! I have a Web page in ASP.NET MVC (C#) and jQuery where I have a swf file that reads its content from a xml file. And to render this swf, I've already tried jQuery Flash plugin, jQuer Media and swfobject. And in this same page, there is an input text where I write a text and this text will be loaded to the swf via ajax. The text wil...

Best practices for returning and displaying data from AJAX calls.

I have some jquery/php interaction set up on a page. It submits some data to the server and gets back records of data which are then to be aligned on the page for comparison and possible action beyond that. My question is what is the best practice for returning the info and then displaying it? Return JSON object and then create html o...

jQuery call function after load

Need to call a filter function on some options based on a radio selected (Link here), How can I call this after the page is loaded? the radio is set from a DB call and I would like to filter the options ...

Can you change z-index with JS in IE8

Very simple example: http://jsbin.com/ohude Click button1, the 'hello2' text p should change z-index to 89. Click button2, the z-index should change yet again. This is obvious in firebug. But it doesn't do jack in IE8. Can someone confirm? Thanks. ...

How to load an Ajax response into clipboard using jQuery and ZeroClipboard?

I need a way to copy dynamically (Ajax) loaded content into the clipboard in a Web browser. There are many libraries out there that will mimic the copy-to-clipboard functionality using Flash. However, with the new Flash 10 default security settings, copy-to-clipboard setting now requires explicit user confirmation. ZeroClipboard is a J...

Click Entire Row (preserving middle click and ctrl+click)

I have an HTML table, with a link in the first column. I want to allow the user to click on anywhere in the row to activate that link. At the same time I would like to preserve the middle click and ctrl+click functionality of opening a new tab/window. Here is an example of the table: <table id="row_link"> <tbody> <tr> <...

Simple Jeditable Problem

I just started with Jeditable and for 3 hours now it seems I can't figure it out. This tutorial should have been piece of cake: http://www.appelsiini.net/projects/jeditable , but it turned out to be a little pain in the a$$. I've put the jquery.js and jquery.jeditable.js in the same directory with the main page. This is my code (it see...

preventing duplicate data using JQuery

I have a moronic customer that does not seem to understand the English text in an alert that instructs him that his data was saved successfully. He continually presses the submit button and inserts a new row of data into the database. Can anyone suggest a solution to prevent this please? I am using jQuery to submit the data so there is n...

Aborting (HTML) Image Downloads

I have a variety of image sets that I'm displaying on a web page (say 50 images per set). A user may select a set to display from a list, which is loaded via a jQuery ajax call to remove the old img tags and add the new ones. What I'm seeing is that all of the requests for the first batch of stale images still get pulled from the ser...

How can I get a jquery css container to pop up letting the user know data was successfully entered?

When a user inserts data into a form and then submits it, it goes to my php script and inserts the data. The script will return a value letting the user know if the data was inserted or not. Since I am using JQuery, I have no idea how to do this. Can someone please point me in the right direction? All I'm after here is a nice, neat littl...

How should I emulate a mouseenter event using jquery's live functionality?

I want to use jQuery's great live functionality for a mouseenter event, but it's currently unsupported. Below is my first go at a solution, but it doesn't seem optimal. Suggestions? Improvements? // mouseenter emulation jQuery('.selector').live('mouseover',function (e) { // live sees all mouseover events within the selector // o...

javascript to jquery

How do I write the following line which is in javascript in jQuery? var variablename = new functionname('some variable'); This is my js code: var rt = new ResizeableTextbox('myRT'); I need to use this in the following code segment: if($(this).text() =='String') { $("<label id=labelstr"+stringinc+" >"+label+"</label>").ap...

jQuery: what is the best way to restrict "number"-only input for textboxes? (allow decimal points)

What is the best way to restrict "number"-only input for textboxes? I am looking for something that allows decimal points. I see a lot of examples. But have yet to decide which one to use. ...

Proper way of binding events with jQuery

I am somewhat new to Javascript but even more green with jQuery. I've already come across something that's got me scratching my head. What is the difference between: $('.foo').click(function(){ //blah }); and $('.foo').onclick = function(){ //blah } I prefer the second way but it doesn't seem to work. Am I doing something wrong? ...

Allow users to change font size in a webpage

Hi everyone, I would like to be able to change the size of text in a web page, I guess jQuery can be used, but I have no experience in javascript. Another problem is that the webpage is a phtml file, and multiple php echo commands are used. And the page is made up of multiple phtml files. An example of the page is here: http://nordsch...

JavaScript: Adding an onClick handler without overwriting the existing one

I'm trying to modify all links on a page so they perform some additional work when they are clicked. A trivial approach might be something like this: function adaptLinks() { var links = document.getElementsByTagName('a'); for(i = 0; i != links.length; i++) { links[i].onclick = function (e) { <do some work> return true; }...