Search Results

Search found 7677 results on 308 pages for 'wordpress shopping cart plugins'.

Page 124/308 | < Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >

  • will_paginate without use of activerecord

    - by truthSeekr
    I apologize if this is a trivial question or my understanding of rails is weak. I have 2 actions in my controller, index and refine_data. index fetches and displays all the data from a database table. refine_data weeds out unwanted data using regex and returns a subset of the data. Controller looks like: def index Result.paginate :per_page => 5, :page => params[:page], :order => 'created_at DESC' end def refine_data results = Result.all new_results = get_subset(results) redirect_to :action => 'index' end I would like to redirect the refine_data action to the same view (index) with new_results. As new_results are not from the database table (or model), how do I go about constructing my paginate?

    Read the article

  • jquery: call functions immediately after plugin

    - by Dave
    I'm sure that there's an easy answer to this, but I can't find it. I have a table 'myTable' which I stripe using the following $("#myTable tr:even").css({ "background-color": "#FEE996" }); $("#myTable tr:odd").css({ "background-color": "#FFEFAF" }); This works fine. I am also using a table filter plugin as follows $('#myTable').tableFilter(); This plugin places a blank field at the top of each column into which the filter criteria can be typed. When the table is filtered it removes unmatched rows, which in turn messes up the striping. I would like to be able to re-invoke the lines to re-stripe the table. Something like $('#myTable').tableFilter().find("tr:even").css({ "background-color": "#FEE996" }).find("tr:even").css({ "background-color": "#FFEFAF" }); Is this possible please?

    Read the article

  • jQuery colorbox plugin isn't loading inline content

    - by Summer
    Hi, I'm trying to use the jQuery colorbox plugin to show a little warning when a warning icon is clicked. Check out the problem: - Go to http://dev.imagineelection.com/browse/zip/10011 - Click on one of the warning icons (scroll down to see one). See how the colorbox that pops up is empty? I've tried to isolate the problem: - If you click "View Source" -- the div id="address-alert" is in there - If you click "View Generated Source" (for example, with Firefox Web Developer plugin) -- the div id="address-alert" has been taken out, but it has not been replaced inside the new div id="cboxCurrent" that colorbox has put at the top of the page The jQuery call I'm doing is: if (jQuery().colorbox) { $(".warning-class").colorbox({width:"50%", inline:true, href:"#address-alert"}); } What is going on? Why won't the inline content work?

    Read the article

  • Problems re-populating select options in Rails when form returned with errors

    - by Rick
    I have a form with 2 select options in it -- frequency and duration. When there are errors with the form, and it is returned to the browser, the select options are not re-populated with the selections the user made even though the returned values for those fields match the values of options in the selects. Also, when the form is returned, these fields are not marked as having errors even though their values are blank. Here's the frequency and duration fields in Rails <%= frequency_select c, :frequency %> <%= duration_select c, :duration %> The method for frequency_select is def frequency_select(f, method) options = [["day", 1.day], ["other day", 2.days], ["week", 1.week]] f.select method, options, :include_blank => true end And the method for duration_select is def duration_select(f, method, unit="day" ) values, units = *case unit when "day" : [[[5, 5], [15, 15], [30, 29]], "days"] when "other day" : [[[15, 15], [30, 29], [45,45]], "days"] when "week" : [[[4, 29], [6, 43], [8, 57]], "weeks"] end f.select method, values.map {|(label, i)| ["#{label} #{units}", i.days]}, :include_blank => true end If you enter a value into one or both of these fields and submit the form without completing part of it (any part of it), the form is returned to the user (as would be expected), but the duration and frequency fields are not re-populated with the user's selection. If I add this bit of code to the form <p><%= @challenge.attributes.inspect %></p> I see that this for duration and frequency when the form is returned to the browser: "duration"=>3888000, "frequency"=>172800 These values match values on the options in the select fields. Is there anything special in Rails that needs to be done so that the select fields are re-populated with the user's selections? Any thoughts on what the problem could be or what I should try next? Help is greatly appreciated! -Rick PS If you look at some of the other questions, you'll notice I've asked about this in the past. At one point, I thought the form was returning values for frequency and duration in days rather than seconds, but that's not the case. PPS Here's one other bit of information that might matter, but my tests indicate that it probably does not. (Though, I'm a bit of a newbie to this, so don't take my word for it.) These two fields are chained together using the cascade jquery plugin. The javascript is included on the page (not in a separate file) and some of the js is being created by Rails. First, here are the scripts as they appear in the browser. The first is the script to generate the options for the duration select and the second is the script required by the Cascade plugin to trigger the field chaining. <script type="text/javascript"> var list1 = [ {'When':'86400','Value':' ','Text':' '}, {'When':'172800','Value':' ','Text':' '}, {'When':'604800','Value':' ','Text':' '}, {'When':'86400','Value':'432000','Text':'5 days'}, {'When':'86400','Value':'1296000','Text':'15 days'}, {'When':'86400','Value':'2505600','Text':'30 days'}, {'When':'172800','Value':'1296000','Text':'15 days'}, {'When':'172800','Value':'2505600','Text':'30 days'}, {'When':'172800','Value':'3888000','Text':'45 days'}, {'When':'604800','Value':'2505600','Text':'4 weeks'}, {'When':'604800','Value':'3715200','Text':'6 weeks'}, {'When':'604800','Value':'4924800','Text':'8 weeks'} ]; function commonTemplate(item) { return "<option value='" + item.Value + "'>" + item.Text + "</option>"; }; function commonMatch(selectedValue) { return this.When == selectedValue; }; </script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#challenge_duration, #user_challenge_duration").cascade("#challenge_frequency, #user_challenge_frequency",{ list: list1, template: commonTemplate, match: commonMatch }) }); </script> And here's a bit of the the first script as it is in the erb file -- you see that some of the script is being generated by Rails <%= [ [1.day, [[5, 5], [15,15], [30, 29]], "days"], [2.days, [[15, 15], [30, 29], [45, 45]], "days"], [1.week, [[4, 29], [6, 43], [8, 57]], "weeks"]].map do |(frequency, durations, unit)| durations.map do |(label, value)| "{'When':'#{frequency}','Value':'#{value.days}','Text':'#{label} #{unit}'}" end end.join(",\n") -%> Now, the reason I don't think that it matters whether the duration is being generated with JS is the problem still exists if I remove all the JS the problem also affects the frequency field, whose options are not being generated by the JS

    Read the article

  • How can I move windows in Windows with keyboard? [closed]

    - by nestling
    I recently started using Linux and was floored by the ease with which windows can be moved and resized with simple keyboard combinations using Compiz. If I want to move a terminal to top-right of the screen a simple CTRL+ALT+Numpad9 does the trick for me, and it resizes the window at the same time. I'm sure you guys know what I'm talking about. I would like to know if there is a way to do this in windows. Thanks.

    Read the article

  • Cross-platform general purpose C++ RPC library

    - by iUm
    Here's the task: Imagine, we have an applications and a plug-in for it (dynamic library). Interface between the application and the plug-in is completely defined. Now I need to run the application and the plug-in on different computers. I wrote a stub for the plug-in on a computer where the real applications is running. And the application loads it and calls its functions like if it were a native plug-in. On the other computer there's a stub instead of the real application, which loads the native plug-in. Now I need to organize RPCs between my stubs over the network, regardless the very transport. Usually, it's not difficult. But there're some restrictions: Application-plug-in interaction can be reenterable (e.g. application calls f1() from plug-in, in f1() plug-in calls g1() from application, in g1() application calls f2() from plug-in and so on...) Any such reenteration should be executed exactly by the same thread, which started the sequence Where can I find a cross-platform C++ RPC library with such features?

    Read the article

  • Track Users of Website With JQuery Plugin

    - by grungefreak1
    Hi, Is there a way to track users of my site (based on Session ID's) using JQuery? I would like to know what pages and how long they spent on each page for example. Or any other suggestions are welcome. I had tried this with Google Analytics but I cannot seem to track individual users based on an ID. GF

    Read the article

  • Image gallery with a Lightbox in jQuery

    - by Alex
    Hi. I'd like to create a jQuery image gallery of showcased products. It will show one product image at a time, with Next/Previous arrows, and a brief name and price as overlay on the image. If users click it, it will go to the order page. It will have an icon to show a larger, modal version (Lightbox style) of the image with full description, price, and a link to a page to order it. In other words, it's an inline gallery, about 250px X 150px, with next/previous option, but also with a little icon to fire it up in a lightbox type modal window that can have links. Here's an example which doesn't have the inline gallery effect. Here's another, also missing the inline gallery. Is there such a beast as what I'm looking for? Thanks.

    Read the article

  • How to create a new ID for the new added node?

    - by marknt15
    Hi, I can normally get the ID of the default tree nodes but my problem is onCreate then jsTree will add a new node but it doesn't have an ID. My question is how can I add an ID to the newly created tree node? What I'm thinking to do is adding the ID HTML attribute to the newly created tree node but how? I need to get the ID of all of the nodes because it will serve as a reference for the node's respective div storage. HTML code: <div class="demo" id="demo_1"> <ul> <li id="phtml_1" class="file"><a href="#"><ins>&nbsp;</ins>Root node 1</a></li> <li id="phtml_2" class="file"><a href="#"><ins>&nbsp;</ins>Root node 2</a></li> </ul> </div> JS code: $("#demo_1").tree({ ui : { theme_name : "apple" }, callback : { onrename : function (NODE, TREE_OBJ) { alert(TREE_OBJ.get_text(NODE)); alert($(NODE).attr('id')); } } }); Cheers, Mark

    Read the article

  • Query select field on JqGrid edit form

    - by abuzuhair
    I have this colom Model on JqGrid: {name:'ta',index:'ta',jsonmap:'ta',width:70,editable:true,edittype:'select', editoptions: {dataUrl:hostname+'/sisfa/ta_cb'}} I am using JqGrid form editing to edit this field. How to 'catch' the field editor for this field on form editing. I'm using this method, but not work .editGridRow("new", {closeAfterAdd: true, addCaption:'Add Data', width:500,dataheight:300,beforeShowForm:function(formid){ console.log($('#tr_ta').find('select[name=ta]')); }}); This method work for other edittype.

    Read the article

  • jquery / javascript for a user to select 1 of n images

    - by TesterTurnedDeveloper
    I want to display a few images (probably 5 max) and have a user click to select one. First thing I tried was radio buttons and putting the images inside labels. <input type="radio" name="BackgroundId" id="BackgroundId" value="1" /> <label for="BackgroundId"><img src="../../Content/images/thumb_1.jpg" /></label> Firefox will select the radio button when the user clicks the image, but IE doesn't. Is there a jquery plugin that will make the images clickable? Fancy-form looks like something I could use, but it isn't jquery and I've already got jquery in my project. Or can someone point me to a better way of selecting a single image?

    Read the article

  • Ruby on Rails controller and architecture with cells

    - by dt
    I decided to try to use the cells plugin from rails: http://cells.rubyforge.org/community.html given that I'm new to Ruby and very used to thinking in terms of components. Since I'm developing the app piecemeal and then putting it together piece by piece, it makes sense to think in terms of components. So, I've been able to get cells working properly inside a single view, which calls a partial. Now, what I would like to be able to do (however, maybe my instincts need to be redirected to be more "Rails-y"), is call a single cell controller and use the parameters to render one output vs. another. Basically, if there were a controller like: def index params[:responsetype] end def processListResponse end def processSearchResponse end And I have two different controller methods that I want to respond to based on the params response type, where I have a single template on the front end and want the inner "component" to render differently depending on what type of request is made. That allows me to reuse the same front-end code. I suppose I could do this with an ajax call instead and just have it rerender the component on the front end, but it would be nice to have the option to do it either way and to understand how to architect Rails a bit better in the process. It seems like there should be a "render" option from within the cells framework to render to a certain controller or view, but it's not working like I expect and I don't know if I'm even in the ballpark. Thanks!

    Read the article

  • how to disable vim autocomplete popup for plain text files?

    - by doorfly
    After literally days of tweaking, I think I got vim's autocomplete (omnicomplete + Acp plugin) to work acceptably. But the annoying thing is that it is still enabled for plain text files so I would have to type :DisableAcp for README or plain text files. How do I add logic to my vimrc so that if it detects an empty filetype it disables the Acp on startup? here is what I wrote: if &filetype == "" let g:acp_enableStartup = 0 endif but this disables Acp on start up for all files.

    Read the article

  • Jquery loads only after F5 in IE

    - by khushi
    I am using Jcrop jQuery to crop image in MVC3 application. following is my javacript function: jQuery(function ($) { $('#imgLab').Jcrop( { onChange: showCoords, onSelect: coordsSelected, onRelease: clearCoords } ); }); Image ID is 'imgLab'. Image src path is coming from database. Now this work fine in FF,Safari and Chrome. but in IE it only works after I press F5. Can anyone tell me what is wrong in code? Thanks in Advance. Khushbu

    Read the article

  • Anyway to error check PHP in Dreamweaver?

    - by user60310
    I do all my PHP coding in Dreamweaver (currently version CS3) I am used to it and like it. There is one thing I would like though, is to be able to check for errors. Currently I don't see them until I upload the page to a server. Is there anyway to setup PHP error checking in Dreamweaver? Thanks.

    Read the article

  • Will_paginate Plugin on two objects on same page

    - by piemesons
    Hello I am using will_paginte plugin on two objects on a same page. Like on stackoverflow. There is a profile page on which there is a pagination on two things QUestions and answers. I am having problem ie:-- when user is clicking on questions pagination page 2. answers page are also updating. The reason is both is sending a post variable ie params[:page] How to change this variable so that only one should be updated. and how to maintain that user should not lose the other page. ie he is on 3rd page of questions and 1st page of answers and now he click on 5th page of the questions the result should be 3rd page of questions and 5th page of answers.

    Read the article

  • [jQuery] JS inside the template

    - by Martin Trigaux
    Hello, I'm trying to include some javascript code inside a template. The code of my html page : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript" src="jquery-jtemplates.js"></script> </head> <body> <div id="infos"></div> <div id="my_template"></div> <script type="text/javascript"> $(document).ready(function() { $('#my_template').setTemplateURL("my_template.html"); try { $('#my_template').processTemplate({'var' : 1}); } catch (e) { $('#infos').html('error : '+e); } $('#my_button').click(function(){ alert('it works outside'); }); }); </script> </body> </html> and the template content of the template<br/> {#if $T.var == 1} <script type="text/javascript"> $(document).ready(function() { $('#my_button').click(function(){ alert('it works inside'); }); }); </script> <input type='submit' id='my_button' value='click me' onclick='alert("direct");'/> {#else} not working {#/if} produce me an error inside the infos balise error : SyntaxError: missing } after function body if I just put alert('it works inside'); inside the script balise (remove all the jquery related code), the page load, the two message "direct" and "it works outside" are showed but not "it works inside" message. It's suppose to works as said on the doc page Allow to use JavaScript code in templates Thank you

    Read the article

  • How to repopulate DataTables when having lots of data?

    - by chobo2
    Hi I am using datatables jquery plugin. I now have to clear the entire datatable and populate it with new data on the fly(all done through ajax). So what I was thinking to do is when I need to do this. Destroy the datatable remove the data html call up the partial view that renders the table Rebind the datatable with jquery. However it seems that datatable has no destroy method. So I know you can set the datatable to do something with ajax but I am not sure how. My datatable just uses the dom way when the page is loaded. I don't want to use the "fnAddData" as I am not sure how to format this 2d array they want and I don't think this is the best option. I think the best option is some how render the partial view back and use there ajax plugin. But I am not sure where that is or how to use it(I know it exists but that's about it). Thanks

    Read the article

  • jQuery UI Element vs Dojo (Dijit) Form Element

    - by Muers
    Dojo seems to have a useful feature in that it can setup event handlers and default options, etc for Dijit.form elements as it is inserting it into the DOM. For example, Dojo: var slider = new dijit.form.HorizontalSlider({ name: sliderContainerId+'_slider', value: sliderValue, minimum: sliderMax, maximum: sliderMin, onChange: function(value){ // some event handling logic } }, sliderContainerId); However, the jQuery UI Slider traditionally is applied to DOM elements that already exist: $( sliderContainerId ).slider({ value:100, min: 0, max: 500, step: 50, slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.value ); } }); I need to be able to 'programmatically' create new Sliders (and other form elements), but I'm not sure how that could be achieved with the way jQuery is structured? Maybe I'm missing something obvious here.... MTIA

    Read the article

  • Getting all the classes in project and their packages from CodeRush extension

    - by drasto
    I've spent some time trying to find a way CodeRush could add using when it finds undeclared element that is in the fact class name with no using added. The solution suggested in this answer to my question (Refactor_resolve) does not work (bugged?). In a process I found out that writing plug-ins for CodeRush is easy, so I decided to code this functionality myself (and share it). I'd only implement a CodeProvider (like in this tutorial). The only thinks I need to do the job are answers to this questions: At the start up of my plugin I need to get a list (set, map, whatever) of all classes and their packages. This means all the classes(interfaces...) and their packages in project, and within all referenced libraries. And I also need to receive updated on this (when user adds reference, creates new class). Can I get this from some CodeRush classes or maybe VS interface available from CodeProvider class? How do I add created CodeProvider to the pop-up that is shown when user hovers over an Issue?

    Read the article

  • How to implement automatic replacement of typos in Delphi2010

    - by sum1stolemyname
    I am looking for a way to develop a plugin for Delphi 2010IDE and have yet to find any information on that topic, not even on how to get started. What I want to accomplish is some kind of auto-spellchecker wich can be given a list of common typos (flase instead of false, .cerate instead of .create and the like) and replace them with the intended word. Do you know of a tutorial on plugin development, or maybe an open source plugin which i could base my work on?

    Read the article

  • jQuery Light Box not loading in all system?

    - by Harish
    I am using jQuery's thickbox.js pluging, for a modal dialog box that will appear when some one first loads the website(as a welcome banner), and after clicking on "enter site" they should be logged in to my home page. But the problem is "Modal dialog box appear's to be empty in some system(i.e OS), with same configuration, and shows only the loading progress bar". it works in some system only.. please help to find the problem??

    Read the article

  • JQuery Cascade dropdown problem?

    - by omoto
    Hi All! I'm using JQuery based Cascade plugin probably it's working, but I found a lot of problems with it Maybe somebody already faced with this plugin and maybe could help. So, I using this plugin for location filtration Here comes my CS code: public JsonResult getChildren(string val) { if (val.IsNotNull()) { int lId = val.ToInt(); Cookie.Location = val.ToInt(); var forJSON = from h in Location.SubLocationsLoaded(val.ToInt()) select new { When = val, Id = h.Id, Name = h.Name, LocationName = h.LocationType.Name }; return this.Json(forJSON.ToArray()); } else return null; } Here comes my JS code: <script type="text/javascript"> function commonMatch(selectedValue) { $("#selectedLocation").val(selectedValue); return this.When == selectedValue; }; function commonTemplate(item) { return "<option value='" + item.Id + "'>" + item.Name + "</option>"; }; $(document).ready(function() { $("#chained_child").cascade("#Countries", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Län------</option>"); $(this).find("option:first")[0].selected = true; }); $("#chained_sub_child").cascade("#chained_child", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Kommun------</option>"); $(this).find("option:first")[0].selected = true; }); $("#chained_sub_sub_child").cascade("#chained_sub_child", { ajax: { url: '/locations/getChildren' }, template: commonTemplate, match: commonMatch }).bind("loaded.cascade", function(e, target) { $(this).prepend("<option value='empty' selected='true'>------[%Select] Stad------</option>"); $(this).find("option:first")[0].selected = true; }); }); I added one condition to jquery.cascade.ext.js if (opt.getParentValue(parent) != "empty") $.ajax(_ajax); To prevent Ajax request without selected value, but I faced with problem, when I reset selection in first box 3d box and bellow does not refresh: And second issue: I would like to know where is best place to inject my own function that will do something, with one requirement - I need to know that all boxes finished work. If somebody worked within let me know maybe we could together find solution. Thanks in advice...

    Read the article

< Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >