javascript

jQuery events not firing

I'm creating a simple jQuery editor, nothing complicated, and just can't seem to find out why the events do not work. See code below. var $editor = $('<div>').addClass('editor') .insertBefore(this.$element) .append(this.$element); var $b = $('<div>').addClass('button-wrapper') .appendTo($editor); this.$element.css({h...

Best way to prevent a field from blurring?

I have a text field that I would like to maintain focus, no matter what. The problem is, my page loads an iframe (cross domain), the contents of which steal the focus. What's more, the user might be typing in my text field as the iframe steals focus, causing the user to type in the iframe's text field instead. I've tried spamming the ...

How to use jQuery and Ajax to return just one string and how to insert it to a DDL in a jdialog?

I'm trying to create a dynamic module where I drop an object on screen. Then a jQuery dialog opens with three drop-down lists. When I select a value in the first drop-down list I'm trying to filter the results in the next list via Ajax. This is my JS code: $("#ddlTableType").live( 'change', function() { ...

How can i disable all setTimeout events

hello. i am using ajax and asp.net . i have a javascript function which creates many setTimeouted other javascript functions . after asynchronous postback happened i want to disable all of this setTimeouted events. thank you. ...

disable zoom on tap

I have an image bar which slides on move. But when i single tap on that bar its shows a magnifier. How i can disable that magnifier on tap? ...

html (with css) to pdf conversion in java script

Hi Can anyone suggest a good (preferably free or inexpensive) java script library that can convert HTML (with css links) to PDF? Right now i am using flying java library. But the problem is when we switched over to https it fails to process the css files and doesnt work. Also every time I need to generate a pdf i need to do it on th...

Jquery Slider PNG black borders IE8

Greetings, I'm having a lot of trouble with the IE8 buy of getting black borders when using a JQUERY slider, with PNG transparent images. Using a slightly modified version of the Nivio slider. I have searched high and low for fixes and blocks of code but so far none have worked. What happens is that as soon as the img cycles it gets ...

how to accept only alphabetical pressed keys ( for "autocomplete" purpose )

Hi there ... am wondering ... how to only accept alphabetical pressed keys from the keyboard .. i am using the jQuery .keypress method ... now i wanna know how to filter the passed key ... i am trying to build a simple autocomplete plugin for jQuery ...i know a about jQuery UI, but i want to do it myself ... thanks in advance :) ...

How to pass a checkbox array from form to results page.

Im trying to build a page that will allow a user to select a maximum of 8 out of 20 checkboxes, in a specific order, on a single form. Im trying to make a page that will only be viewable if the right sequence of checkboxes are clicked, a neat way to let only those who have the checkbox sequence in on a certain part of my website. What ...

jQuery not posting all inputs of a form after the .append()

I have a form generated dynamically with the method .append() of jQuery. I can add any number of new input, textbox, cmbbox, etc... But the problem is that when I do the sumbit of the form, the PHP target does not receive the new input added, but just the vars connected to the input already in the form before the append(). Any ideas? ...

JavaScript put variably into url, then use it if reloaded

We're working on a music page to list albums, songs and add lyrics. We have a "View More" below each album, clicking that shows you the song list (using jquery, making a hidden div slide down). We'd like to add a variable to the URL if someone clicks it (or remove it if they "hide") the songs, so that it creates a permalink to that sec...

selecting multiple elements using shift and mouse click - jquery

Is it possible to use shift and mouse click to select multiple elements on a page using jquery? I have several divs that i have given a tabindex to so that i can select them and can do things like delete them etc. I want to be able to select more than 1 by holding down shift and using the mouse to click on each div and am struggling to...

Raphael JS Question

I am following a tutorial from netuts about raphael js and I dont understand one of the examples, could some one possibly explain this to me in plainer english. I know I should learn more about javascript first. for(var i = 0; i < 5; i+=1) { var multiplier = i*5; paper.circle(250 + (2*multiplier), 100 + multiplier, 50 - multip...

Website freezes on load for a couple of seconds.

I'm working on a Wordpress-powered website (hasn't gone live yet). Most of the time when I load the home page it's fine. Sometimes, however, it freezes for a second on load, before continuing as normal. How do I debug this issue? ...

Styling a parent from a child off-site Iframe?

This is most likely possible, but I want to style the main page using CSS while all I have access is a sandboxed iframe child. Please note that the child iframe is on a different subdomain than the parent. Can this be done? and how? ...

Php to get value of hashtag from URL

How can I get a variable of a hashtag in php. I have a variable on page like this catalog.php#album=2song=1 How can i get the album and song values and put them into PHP variables? ...

chrome debugger what is (program) in profiler?

What is (program) in the function column of the chrome debugger? ...

Trying to use JSON to get cascading DDLs but not getting response

Hello, I'm trying to create cascading DDLs. My aspx page: <form id="form1" runat="server"> <table> <tr> <td>סוג שולחן</td> <td><asp:DropDownList ID="ddlTableType" runat="server" /></td> </tr> <tr> <td>קוד שולחן</td> <td><asp:DropDownList ID="ddlTableCode" runa...

Open 2 webpages on link click

Hello, I have an IFrame on a webpage, and upon clicking on a hyperlink, I need to be able to refresh the IFrame AND ALSO open a different website in a new browser window, any help at all is greatly appreciiated. Thank you jase ...

ASP.NET MVC 2 Filtering multiple drop down lists

I know how to approach this problem but i have very little experience dealing with anything web related. The situation is: I have a controller that returns a view with a user control in it. Inside the user control i have 3 drop down lists; one for companies, one for field offices and one for facilities. When the companies ddl is altered...