jquery

jQuery detect form is ready for submit (no alert messages displayed)

I have a webpage that I don't have the ability to change the underlying source, only can use jQuery to manipulate it. The way the page works currently, when the form submit button is pressed, if there is anything wrong with the form, it will throw up alert message. If the page is valid, it will just submit the form normally. What I am...

Change DIV contents on SELECT change

I'm looking for a method of how to change the contents of a div when an option on a select dropdown is selected. I came across the following: <script type="text/javascript" src="jquery.js"></script> <!-- the select --> <select id="thechoices"> <option value="box1">Box 1</option> <option value="box2">Box 2</option> <opti...

Make long log data diplayed with PHP easy to read

I have a long log file I am displaying with PHP. Its getting too long for me and I have to use CTRL+F to look at this thing in any way. What is a good way to display this data in a way easy to read? Best way would be using jquery. ...

How to trigger TinyMCE iframe creation/init in drupal/jQuery site for moved/cloned iframe

I am working on a jQuery-based plugin as a drupal module that will tweak the comment form for a content type so that it appears inline on clicking certain content. When I try to clone() the comment form and append it to a hidden div so that I can access it later, the TinyMCE iframe does not come with the cloning, so I'm left with an empt...

Apply the REL attibute automatically to posts using jQuery

Edited: I mean grouping as giving the same REL attibute to all IMGs in the same post, but each post has different REL as the example at the end of this question. So, I need to do the following: <div id="Blog1" class="widget Blog"> <div class="blog-posts hfeed"> <div class="post hentry uncustomized-post-template"> <a name="8829400899632...

How to use jQuery to add a new row to a table, and assgin an incrementing id to it

Hi All, I have an existing HTML table, part of a form where the user enters GPS points. The user also has the option to upload GPS data points. I'd like to have a button the user can press where some Javascript will add one or more new rows to the table, but the new row(s) must continue incrementing the name and id values used in the ...

JQuery drag/scrolling/overflow issue.

I have a scrolling:auto problem with JQuery 1.4.2 and JQuery 1.7.2. I have a container DIV with 2 DIVs inside it. Like this: <div id="dragContain"> <div id="dragMe"> <div>Title goes here!</div> <div style="scrolling:auto;">Content goes here!</div> </div> </div> And I enable dragging the group by: $('#dragMe').draggable({ co...

UpdateModel not working consistently for me if a ddl gets hidden by jQuery

Hi My jQuery code hides a ddl under certain circumstances. When this is the case, after submitting the form, using the UpdateModel doesn't seem to work consistently. My code in the controller: // POST: /IllnessDetail/Edit [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(IllnessDetail ill) { I...

How can I display "please fill required field" in diferent languages using jquery.validate and ?lang=?

I'm using $lang = $_GET['lang']; and some arrays to change the language of the page. So my pages URL look like this when I select a language: ...index.php?lang=en (so my index page never changes neither my jquery files) (more details in my previous post) I'm using jQuery validate plugin to validate my form and a custom.js: $(document...

Jquery Dialog..What am I doing wrong?

I am not sure what I am doing wrong. The dialog box comes but it does not follow any of the settings I specified. function voteToday(id,userid){ $(".pleaseLogin").dialog({ autoOpen:false, bgiframe: true, resizable: false, width:200, height:75, modal: true, overlay: { backgroundColor: '#000', ...

Is there a Rails or JQuery date picker that includes a predefined set of named ranges?

Before I roll my own (again, I already did this once in Java), is there a date picker that allows predefined named ranges in addition to the standard user-chosen dates. For example, I want the user to be able to choose 'Today' or 'This Week' or 'Last Month' and store it in such a way that it's relative to the time I access it, not based ...

Creating HTML: PHP server-side vs. jQuery client-side

This is a design question. I have data that needs to go into an HTML table, which will later be manipulated by the user. Basically the user will be able to select items in the table rows. I have two options - in both cases I'm using AJAX to get the data: Create the HTML code using PHP on the server side, send it to the client as HTML....

VS2008 jQuery Intellisense not working - (jquery-1.4.1.js)

Hi folks, I have searched on google, followed scottguthrie's article & also here on SO for a solution but to no avail. My environment consists of VS2008 SP1, including hotfix for JQuery intellisense. I have downloaded 'jquery-1.4.1.js' & also 'jquery-1.4.1-vsdoc.js' from the jquery website. Referenced it in an 'HTM' file like this: <sc...

How can i pass a single string to a partial View from an action that returns the partial view

I am trying to learn MVC, and i'm creating threaded comments functionality for a simple webapp. I have a view which lists the comments, and has a reply button that uses jQuery to load a partial view which is basically a comment form. I need to pass the parent commentId to the partial view and then populate the parentCommentId hiddenfiel...

jQuery Keypad z-index issue with a modal dialog

Hi everyone, I'm using a jQuery modal dialog (see link) with an element that uses jQuery keypad (link). Firebug shows me that the keypad is coming up but behind the dialog. I tried using bgiframe() but it doesn't work. What could be wrong? $('.dialog').find('#test').keypad(); $('#keypad-div').bgiframe(); keypad-div is the div that ho...

jquery , append html

Hi! I have this kind of HTML : <h1> Text1 Text2 </h1> I want via jquery to change this HTML in : <h1> <span>Text1</span> Text2 </h1> I my head is coming just append and regular expression (maybe you have another ideas ) , unfortunately I don't have experience with "regex" . The "Text1" is changeable .. It should be the first te...

Change queries dynamically - php, jquery

Hey I'm trying to get 2 main sql queries to be more dynamic. When the user clicks the marketing link, I want the 2 queries below to be updated with that link Id: 1. <?php generate_pagination('SELECT * FROM explore WHERE category="marketing"'); ?> so when the marketing link is clicked, I want the query to change the category in the qu...

Detecting changed form values -- Firefox replaces with user-input values, breaking dirtiness detection.

Hi, I'm implementing form dirtiness detection for a web-app. The 'dirtiness' that I'm interested in is the server's value versus what's displayed on the form. The server is running Django, most of our scripting is in jQuery. We serve the form fields with the correct default values corresponding to the value on the server, e.g. <input ...

format JSON value with a php function and print result inside a div#id

So far, I have got the following: $.getJSON('getinfo.php', { id:id }, parseInfo); function parseInfo(data) {    $('div#info').fadeOut("fast", function() { $('div#info').html(data.desc); } } I am able to print the results (data.desc) inside the div#info html tag, but before I do so, I want to format data.desc with my php fu...

How to dynamically load a value into a text field???

Hello guys, I am having a small problem with pushing a value into a input text field and have it pass on to the next step upon submitting a form in IE. This process works just fine in FF and Chrome and pretty much every other browser. Here is the input field: <div id="donate_form_gift"> <fieldset id="donate_form_g...