jquery

jQuery UI Dialog - Ajax in PHP

I have an HTML form in a PHP file like the attached snippet: When I hit the "Save Details" button, I want the page to load a jQuery UI modal dialog. That dialog will execute a controller action (ex:savedetails) through Ajax. Essentially, the controller action will get all the POST details in "frmEmployees" and saves the changes to a dat...

JQuery update javascript snippet

The scenario is that I'd like to update a javascript snippet (that renders a widget) when a user clicks a button. The idea is that a user can enter a number of parameters to configure their widget and then click a button to see a preview of it. Is there a way to do this via jquery? The snippet would look something like this: <script ...

jQuery UI Dialog OnBeforeUnload

I have a small problem. I'm attempting to catch the OnUnLoad Event of the Window and ask a confirmation question and if the user decides they want to stay then fine, and if they want to leave the page then they'll lose all unsaved data. Here's the issues... I'm using a jQuery UI Dialog and when I put the following code on my page, I h...

jQuery: send keystroke

hi all, i'm having a widget with a search-textbox. when pressing enter in it, search starts. i now want to trigger that enter key by code. in other words, i want to send the enter-keystroke to the textbox. how does it work? thx ...

Selector - Selecting all tables on a page in jQuery

Say I have multiple tables (no IDs or names) on a page at various levels within embedded divs. What would my selector be (if it is possible) to select all tables regardless of where it resides on a page and iterate or filter the tables based on the content of the first cell in the first row? ...

jquery newbie: how to efficiently do multiple actions on same DOM element?

Hi everyone, I recently learned (here on stackoverflow : ) ) that when using jquery every time I write $("...") a DOM search is performed to locate matching elements. My question is very simple: how do I efficiently perform a series of actions (using the nice methods of jquery objects) on a DOM element I have located with jquery? Cur...

Jquery Superfish problem in IE7

Hi all, only in IE7 the submenu appear under my page's content. I use bgframe plugin. Here my code: $("ul.sf-menu").superfish({ speed: 'fast', autoArrows: false // disable generation of arrow mark-up }).find('ul').bgIframe({opacity:false}); Do you have any ideas? Thank you very much. Bye Z ...

Modal popup File Upload

Hi, I use Eric martin's contact form modal popup in one of my personal projects. I wish to add file upload to it, however when I try to get the file, I'm able to view the file. I'm pretty much new with Jquery. I tried couple of AJAX Upload and uploadify, thats also didnt work. Please suggest me some solution to proceed. My Frontend is...

jeditable: how to use existing cell value as the "selected"

The cell that is editable contains either 0 or 1 (not Active or Inactive). How do I make it selected? I have tried something like below: $('#isEditable).editable("post.php?type=myPost", { data : " {'0':'Inactive','1':'Active','selected':'"+<< put value of the clicked on cell here >>+"'}", type : 'select' }); Currently Inac...

JQuery picture load

Hi everyone, I need some help in jQuery. What I'm trying to do is to create some sort of a small picture gallery. In this gallery I've got a couple of small pics and one big pic. By clicking a small picture I want jQuery to load and replace the big picture. Here's a little try which does not work! But probably someone could tell me wh...

javascript library/plugin to display button/dropdown menu with checkbox?

I'm looking for a library that implements the following widget: Dropdown (similar-ish to <select>) where you pick 1 value, onchange fires but the visible "value" is really the label, like a prompt. So it's more like a button when clicked shows a list of values, but otherwise acts like the HTML SELECT. In addition, the width of the wid...

question about jquery .ajax function?

hi all: I used jquery's .ajax function like: $.ajax({ type:"POST", url:"./index.php", data:{ajax_fetch:1,action:"fetch_devInfo",nwType:nw_type,devTSN:dev_tsn,devSTime:dev_sTime,devETime:dev_eTime,dev_gType:dev_graphType}, dataType:"xml", error:errHandler, success:function(xml,textStatus) { xml_process(xml,textStatus,$("div#cont-De...

How do I get the URL for Google Map embedded on my website?

I am displaying a map on a website using the Google Map API. I want to include a link on that same page to take them directly to the map on Google Maps. Is there an API call I can make to the map to retrieve the URL of either the current location/zoom level or the starting location/zoom level? ...

JQuery - Group Checkboxes

Hi, I have the following code which expands and collapses a subcategory when the arrow image is clicked. <html> <head> <script src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script> google.load("jquery", "1.3.2"); google.load("jqueryui", "1.7.2"); </script> <script language="JavaScript"> function toggleTableRows() { $(...

replace page with jquery $.post response

Hello, I'm using jquery's $.post like this: $.post("/searchresult", $("#searchDiv").serialize(), function(data) { //??? }); The "data" parameter has all the html code of the result page I want. The question is how do I replace my current page's content with this one returned by the $.post function. Thanks, Rui ...

How do I get this if-statement with jQuery .css to work?

In my code jQuery code (I know the if statement isn't jQuery), the css property "right" for the class "slider" does NOT equal 30, yet "container" is still fading out on mousedown.. What am I doing wrong? I want it to be: if the class of slider has a "right" css property equal to 30px, then fadeout the container. $(document).ready(functi...

jqPlot, canvasrenderer labels with html inside them

i am using jqplot to graph some data. my axis label has a micro in it. &micro; but it is being passed through as that and not an entity. here is the code axes:{ yaxis:{ label:'L,&micro;H', autoscale: true, labelRenderer: $.jqplot.CanvasAxisLabelRenderer } } is there a way to not have the entity be conv...

Datepicker for web page that can allow only specific dates to be clicked

Is there a Javascript or some library that would create a datepicker for a webpage (similar to Jquery UI DatePicker that would only allow certain dates to be clickable and highlighted. For example on server side, I could specify a array of days to enable to be selected. ...

JQuery / CSS - add color to un ordered list items

can someone help me create the following effect using JQuery?: I have several un-ordered lists on a web page: <ul><li>01</li><li>02</li><li>03</li><li>04</li><li>05</li><li>06</li><li>07</li><li>08</li></ul><ul><li>01</li><li>02</li><li>03</li><li>04</li><li>05</li><li>06</li><li>07</li><li>08</li></ul> I want to apply CSS classes us...

Handling errors in jQuery(document).ready

I'm developing JS that is used in a web framework, and is frequently mixed in with other developers' (often error-prone) jQuery code. Unfortunately errors in their jQuery(document).ready blocks prevent mine from executing. Take the following simple sample: <script type="text/javascript"> jQuery(document).ready(function() { n...