Hijack MVC3 form submit after model validation
Hi, I'm trying to get some jQuery running in an mvc3 website AFTER the form validates the model but BEFORE the HTTPPOST event handler runs. Is this possible? Right now I've got both of them (HTTPPOST method and jquery code) running on the click on the submit button with a simple: $("form").submit(function (e) {} method. So to sum up, I want it to run in the following order after the submit button is clicked the form the validate the fields with the built in viewmodel validation if the fields are
jQuery 1.8.2 | Save div contents as playlist for future retrieval?
My multimedia app allows appending in a div the ol listing of clickable thumbnails, titles and durations of youtube videos for future replay. I was wondering how to save the ol element (with all the contents of li child elements) for future retrieval on a click of a button? Would the following cookie function work? https://github.com/carhartl/jquery-cookie/blob/master/README.md . I've read that cookies are not the way to go for this type of data, is that accurate? Basically, in my app, a button would
Label for 'this'
Hi all. Can anyone see what I am doing wrong here? $("label[for=' + $(this).attr('id') + ']").addClass('error_label'); Thank you :)
[jQuery] tablesorter bug?
The tablesorter is acting goofy and I'm wondering if anyone has any insight to the problem or a way to fix it. I'm adding rows to a table then calling tablesorter: $('#myTable').tablesorter(); Works fine. If I clear rows from the table then add more rows, I call tablesorter again: $('#myTable').tablesorter(); When I try to sort, records that were previously removed pop into my table again. There doesn't seem to be a way to clear the tablesorter before reloading it with the new table results. For
How to show an image properly?
Dear friends, I am uploading a image and showing it to a fixed size(width='728' height='286')image box but images are not showing correctly as the actual image , even the large images seen faded or distort , is there any function or any property or something like this by which i can show a proper image in the image box. If yes then pls share any link or your suggestion to do this, thanks
[jQuery] Tablesorter plugin, sort cache problem
Hello, I've created dynamic table using tablesorter and the sort function works fine at first. The problem occurs when I want to sort new data. To make it clearer here's the flow: 1. Generate data, display on table 2. Sort works fine 3. Remove all data row, generate new data, display on table 4. Sort problem, the previously removed data shows up again :( Is there anyone know how to fix this issue ? Thank's in advance.
jquery tabs
Hi Below is my java script code,this is working fine,but i want to reduce the no of lines of code.i want to use it without hardcoding like (menu1,menu2.........etc) the click function also should not hardcode...... $(document).ready(function() { $(".jstest").roundedCorners({ wrapperClass: 'rc-panel3 rc-panel3.rc-tl rc-panel3.rc-tr rc-panel3.rc-bl rc-panel3.rc-br', wrapperId: 'rc', overrideCSSRadius: true }); $("#instantdownload").roundedCorners({ wrapperClass: 'rc-panel3 rc-panel3.rc-tl
Menu Widget Horizontal?
Q. How can I get the Menu widget to show horizontal? http://jqueryui.com/menu/#navigationmenu
How to create multiple change function.
I have an html select and a add button. If any one click on add button then an html select create same class, name. My problem is if I change first html select then change function work properly but if I change created html select then change function don’t work. Please can someone point out what I may be doing wrong here? Many thanks. Here is my code: <html> <head> <title>the title</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Enable or disable select option
Dear all the jquery comunity, I would like to know how to enable or disable all or just one element of a select option. Thanks. Tegatti
How to access dynamically added content?
I'm sure this has been answered before, but I haven't had any luck digging it out. Basically, I have a workflow-type interface, wherein a user can add in several boxes of content which are chained together to create a workflow. The individual boxes are laid out in HTML, along these lines: <div id = '#workflow-box-template'> Arg 1 : <input type = 'text'><br/> Arg 2 : <input type = 'text'><br/> Arg 3 : <input type = 'text'><br/> <button>close button</button> <button>cancel
Show / Hide for multiple Divs
Hi, Sorry if I am treading on old ground but I am new to jquery. I have a page with 3 divs and 3 anchors. I am trying to build this page that loads with all 3 divs hidden, then when someone clicks on the first anchor div 1 displays. If they click the 2nd anchor then div 1 hides and div 2 shows and so on. What is the best way to do this? My code below half works, but it forces the divs that are already hidden to hide again (which looks stupid). Thoughts from the pros out there? <!DOCTYPE html> <html>
Trying to show text from an XML file
Hello, I am trying to populate an array with terms from an XML file but I can't seem to get it going. The alerts below do not show any information or text from the XML file. Is this not storing the entire XML element? Later I will need to index with the 'term' attribute and return one of the other attributes. $(document).ready(function() { var glossArray = []; $.get('glossary/glossary_data.xml', function(d){ $(d).find('item').each(function(){ glossArray.push($(this).val());
Using Ajax offline
Hey, I'm currently building a web app with jQuery. I'm using Ajax to create smooth page transitions (fadeout -> load new body content with ajax -> fade in). This works perfectly but requires a webserver. Thats a problem, because I'm only loading static HTML and Javascript. I don't have any server side code. I want to publish the app on CD also for people without internet (trust me, they exsist ;) ). Is there any solution to use my code offline? Of course I could write different code, because I don't
jquery browser
hi I need some help , I want make function when visitor exit browser or exit page or change my page , haw can I do this , thanks .
I am trying to do vertical tabs
Please look at this link. I trying to get this effect with vertical tabs. http://bluetoad.com/publication/?i=89702 This is dynamic with ajax and c# to and <div id="bookContainer"> <div id="book"></book> </div> $("#BookContainer").append(ContentMenu); function GetContents(BookID) { $.ajax({ type: "POST", // AJAX type post url: "tabletbook.aspx/GetContentsMenu", data: '{"BookID": "' + BookID + '"}', contentType: "application/json; charset=utf-8", //This is dataType: "json", //We need to specifiy
Select next character?
I'm trying to hide a "|" character that is next to an <A> tag. I cannot figure out how to find it, because it has no class or ID. EX: <a href="home.htm">Home</a> | <a href="intro.htm">Intro</a> | <a href="whatever.htm">Whatever</a> I need to hide the link for Intro and the "|" next to it. $('a[href$="intro"]') gets me the link. But how do I get the pipe, and how do I change its visibility? Thanks
How to update part of a table.
Hello guys, I have a table with some orders that are updated each five minutes using JQuery $.Ajax, but everytime the whole table is updated with all orders while I just wanted to update the new rows. Someone knows how can I do that? I just need a help with the logic, the code I think I can develop after. Thanks!
cancel events
After you have declared an event (is this called creating an event handler) in jquery ie $(object).click(dothis) is it possible to stop that event handler.
video tag DOM events problem
i am trying to use the DOM events for the video tag (html5 video) i am using the events listed here http://www.w3schools.com/tags/ref_av_dom.asp yet no matter which event i use the code runs when i load the page not when the event is triggered this is my code <script> document.getElementById('vidz').volumechange() = hollow(); function hollow(){ alert("test"); } </script> no matter which event i use in place of volumechange() i get the same problem i have also tried using volumechange() without
Maps Not being displayed in Internet Explorer
Hello, Any idea why the map is not being displayed in Internet Explorer but works fine in Firefox and Chrome? http://www.gcprive.com/ai1ec_event/club-test/?instance_id=32 many thanks, Andy
how to make parent link active
Howdy, I'd like to use the jQuery UI menu or accordion AND have the parent node open an a href when selected in addition to perform its other function of showing its children/nested links. I'm using the following code, but realize I probably need to configure something in the jquery-ui.js file. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>jQuery UI Accordion - Default functionality</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"
Enable or disable a menu item
Hello everybody, I need help to implement a jquery function in my site to enable or disable a menu item from the control panel. The page that will be enable or disable it depends of the director of the school at the end of the school year. Till that period it will be disabled, when they start the polls at the end of year, the administrator of the site will enable that page from the control panel. Please, can someone helps me? Thanks in advance. Tegatti
ajax-json wcf rest service did not get data on mozilla browser
Hi, I am developing application which consume wcf rest service via ajax and json. I am getting result when I use Internet explore but for other browse like Mozilla and chrome it did not give any result. Please help. Thanks, Pramod Following is the code: <script src="js/JSon.js" type="text/javascript"></script> <script src="js/jquery-1.6.2.min.js" type="text/javascript"></script> <script src="js/jquery.js" type="text/javascript"></script> function fillcategory() { var GetCategoryURl = "http://localhost:4444/Service1.svc/GetCategory"
Relocate and resize web links when using zoom in and out.
This is a flipbook I have the following code that supposed to relocate the links when page change size or orientation on the iPad. I using ajax to an array which get the links. The links write to the page and the green overlay shows where the links are. First images is what happens when use the code below. I need to adjust the links over -25 and 0 this what I am getting all links move and overlap each other. If you look at the second image you will see the original links location. I need for it move
Popup question
Hi, popup is simple is to use. <a href="#popupBasic" data-rel="popup">Open Popup</a> <div data-role="popup" id="popupBasic"> <p>This is a completely basic popup, no options set.<p> </div> What if u have a list view and many record in there. imagine u have like. sale/01_000001_10 sale/01_000002_20 sale/01_000002_30 links like this and when one of them cliked u want to call a link looking like this. sale/01_000001_10/confirm sale/01_000002_20/confirm sale/01_000002_30/confirm do you have to create
using jquery
Hello, I want to know how to use jquery with in the asp.net. Please help me. I tried but i cant. Initially i want to pul jquery message box with asp.net for confirm and messages. Thanks, Chandana
Ajax Simple File Upload
I'm actually new on jquery ajax. i just wanna ask a little idea about how to create simple file upload (with form) using ajax. i tried using this code: //form html <p id="status"></p> <form id="form1" enctype="multipart/formdata"> <input type="file" id="photo" name="photo" /> <input type="submit" id="save" name="save" value="Upload" /> </form> //php file if($_POST){ $name = $_POST['photo']['name']; $tmp = $_POST['photo']['tmp_name']; $path = "images/".basename(name); if(move_uploaded_file($tmp,$path)){
how to solve CORS when calling other domain
I am trying to call other domain(such as my web service running on 8080 and jquery program(index.html) running on 8084),that getting the cross domain problem so i found solution from our forum to implement $.support.CORS = true; crossDomain:'true', even my webservice not calling,in my firebug am getting the following OPTIONS http://10.163.14.56:9000/customerservice/HashValue [HTTP/1.1 200 OK 17ms] but i have set request type is 'POST',when i am using header,it is changed as 'OPTIONS' So please
Is this a jquery issue or css?
Hello; I have a jquery slider that goes over everything! It is located in this page. Please click on Refine Search on right column and scroll down. As you can see the slider goes on top of header. Is this a jquery or css issue? How can I stop it? Thank you
jQuery and Event-Driven(?)
Dear all, I don't know if what I want to do is related to event driven, so I expose my problem. I'm developing a web portal where people can query for metals in biology. The query results can be downloaded but the zip file creation keep a long time. I would that when an user click on download link, the file creation starts and the user can visit other pages. When the creation file is finished a message or the download box appears on the visiting user's page. Is it possible? If yes, how can do it?
Iterate through JSON Result
Dear, How can iterate through this Json result: {"boqItemCodeMaps1":{"C4":["V41","V42","V43"],"C3":["V31","V32","V33"]}}
Ordered lists and their indexes
I've got an ordered list that I'm looking to hide some of the list options but have their respective indexes (the number) stay the same. .hide() hides it just fine.... but then changes the numbers (goes from 1-7, say, to 1-6 rather than 1,2,4,5,6,7) I can get the desired effect by using css with `visibility: hidden`. but that leaves the space behind. Any ideas guys?
<Div> scrolling event is not firing in IE 7 , IE 8 but it is working fine in IE9.
Hi I have div with ID ="mainListDiv". I need to run some code on client side in scrolling event of this div but scrolling event is firing only on IE 9 but not on IE 7 and IE8. Please help me to solve this problem. NOTE: .read() of div is working fine on all IE versions. Below is my code:- $('[id$=mainListDiv]').ready(function () { $('[id$=mainListDiv]').scroll(function () { //some code } }); });
text box minimum value 1
Hello; How can I force the minimum value of this text box to 0 ( or 1)? So when the user clicks on - (decrease sign), it doesn't go to negative value. "Nights" text box in the search filter bar. Thank you
Memory Leak on jQuery's attachEvent
I originally posted the problem below as a question, so I am recreating it as a problem: https://forum.jquery.com/topic/memory-leak-on-jquery-s-attachevent Hi all and thanks for taking the time to read this. I've been struggling for a long time now to try solve what I believe it's a bug on jQuery library. First, the memory leak I've identified is only applicable to IE and I tested on IE 7 only. I used IEJSLeaksDetector to identify the leak point and it points me to this portion of jQuery js file:
Linking multiple classes or ids to a single listener
Hey guys, I was wondering if there was a way to link multiple classes to a single listener. Let me give a pseudo code example : $('.star1 .star2 .star3 .star4 .star5').mouseover(function (){ //do stuff }); something like that, or this $('.star1').$('.star2').$('.star3').$('.star4').$('.star5').mouseover(function (){ //do stuff }); I hope you understand what I mean. Thanks for the help in advance!
Querying JSON data
Hi, Is it possible to query JSON data using jquery selectors or is there any third party libraries/plugins to query JSON data. Linq kind of syntax or jquery selector syntax is fine. Truly appreciate your help. Thanks in advance. Ram
jquery is not functioning
im using jquery to hide certain column(DDC Correction/ radiobutton) based on the radio button(DDC Status) chosen from another column. when i include the query to hide the column (("input[@name=DDC Correction']").hide();) its not working although ive tried so many kind of ways. im using alert to try if theres something wrong with the query. any ideas? suggestions?
Fade in and out in a loop
Hi all I hope its simple enough, I have looked around and can't find exactly what I am after. I have a collection of hot spots (divs) on my web page and I need them to fade in and out when viewing the page so they look like they are pulsing so to speak. When you hover the cursor over one, the pulsing stops for that hotspot only. Could someone provide some simple example code to help get me started? Thanks
Next Page