jquery

jQuery UI working in Firefox, but not in Chrome & Safari?

I'm using jQuery UI, specifically Datepicker and Autocomplete, as follows: <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt;&lt;/script&gt; <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> $("#note_date").datepicker({ maxDa...

Validate different fields depending on what is selected in a dropdown list with jQuery?

I have the following code to hide/show elements depending on what value is selected in a dropdown list on a sharepoint form. It works fine but I want to add some validation to it (required fields) depending on what is selected in the dropdown list "Level". Sharepoint has a default function called PreSaveItem() that I must call to not s...

jQuery - Why can't I add the .php suffix to this Ajax load function

Hello all, I have the following code: <script type="text/javascript"> $(function() { $('#bootChooserControl') .load('/jqia2/action/fetchBootStyleOptions'); $('#bootChooserControl').change(function(event){ $('#productDetailPane').load( '/jqia2/action/fetchProductDetails', {style: $(event.target).va...

jQuery - make a DIV visible on the browser

Hello all, I have designed a long form around two pages. After the user submits the form, I need to force him/her to see the top of the form if the form contains any errors. I have an error holder on top of the form. My question is how to make the browser scrolls to the error holder so that the user can easily see it? Thank you ////...

Check if people picker field is empty with jQuery?

Hi, I have the following HTML <tr> <td> <div id="ctl00_m_g_c6ae303a_6013_4adb_8057_63a214bcfd24_ctl00_ctl04_ctl08_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv" TabIndex="0" onFocusIn="this._fFocus=1;saveOldEntities('ctl00_m_g_c6ae303a_6013_4adb_8057_63a214bcfd24_ctl00_ctl04_ctl08_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLeve...

Is it possible to trigger the onbeforeunload event programmatically?

I'm currently using the jquery-form-observe plugin which uses onbeforeunload to prompt the user about "unsaved" changes. But I have a scenario where I need to trigger this on a button click: the button click ultimately leads to the page changing, but I want to prompt the user before they start the process that the button click kicks of...

jquery doesn't work after load

hi everyone. I got this jquery code which is working just fine. Except on element I load after the page is ready. $('.reply').click(function(){ ele = $(this).attr('title'); $('#'+ele).load('ajax/form_post.php'); $('#'+ele).show(); return false; }); $('.add_com form').submit(function(){ ele = $(this); $.post(...

ColdFusion check if jQuery is loaded

Hi All, I've created this simple script to check if jQuery is loaded <cfoutput> <cfif GetPageContext().getCFOutput().getBuffer().findStringNoCase("jquery.js") eq -1> <script type="text/javascript" src="jquery.js"></script> </cfif> <script> $(document).ready( function() { $("##theValue").val("the replacement"); }); ...

Update an UpdatePanel manually using JavaScript or jQuery

Is it possible to update an UpdatePanel manually using JavaScript or jQuery? What I have is a TextBox at the top of my page. When a user leaves that TextBox I want to run some server code (it will add a record to my database) then at the bottom of the page I have an UpdatePanel which will get refreshed. The UpdatePanel has a GridView wh...

append table row to another table row

I have the following markup on the page. I want to append two more table rows right after this one. <tr><td width="48%" align="right" nowrap=""><b>Type it again:</b></td><td width="52%"> <input type="password" autocomplete="off" maxlength="20" size="20" name="passwordagain"><!-- value="" --></td></tr> Here are the two I want to appe...

What is better for performance: Update specific cells or replace entire table ?

My project requires that I update the contents of a specific column in an HTML table via an AJAX call to a PHP script. In terms of workload: The table contains about 4 columns and about 20 rows (more rows could be added with time). What would be more (or most) efficient: Replace ONLY the column/specific cells that need to be updated...

How to represent mathematical symbols and capture user input for the same

How do you capture user input related to mathematical fractions. Assuming I would like to present a simple square and ask the user to select 3/4ths of a square. What kind of UI control should we use to first all represent a square (with 4 equal blocks inside) and to have a mechanism to capture user input. Assuming you would like to draw...

How to get all Ids from form?

Hi all, I need to get all the ids for buttons. How to do that using jquery? for example, I have two buttons in my form : My requirement is, i need to get these buttons "id" using javascript or jquery? because that id is dynamically changing whenever form loads. Neelagandan ...

jQueryUI datepicker('setDate') removes time..

Hey, is it a bug in jQuery UI? When I call .datepicker('setDate', date); and date is a date-object with time, datepicker set the time of date to 0:00? And if I clone the variable.. var datewithtime = new Date(); var lTmpDate = datewithtime; $('#Modal_KalendarTermin #DP_DatumVon').datepicker("setDate", lTmpDate); .. datewithtime is j...

Jquery add status for a repsonse

<form> <input type="checkbox" id="m_q" name="m_q" value="271">Name</input><div name="status"></div> <input type="checkbox" id="m_q" name="m_q" value="271">Age</input><div name="status"></div> <input type="checkbox" id="m_q" name="m_q" value="271">ID</input><div name="status"></div> <input type="checkbox" id="m_q" name="m_q...

How to show ajax modalpop up using jquery?

When i click on a button in the repeater, i wanna display an ajax modal popup using jquery. I am trying to do that, but its not getting displayed. How to solve this issue? Any suggestions??? ...

Jquery - Hide every visible DIV but not #div1 (and all childs)

Hi, here is my code $("div:visible:not(#div1)").hide(); The Problem: the DIV-Childs from #div1 are hided too :( kind reagards Peter ...

how to delegate this in javascript?

var selValues = {}; selValues['234'] = $('#asd').val(); selValues['343'] = function () { var el = ''; $('#asd input[@type=checkbox]:checked').each(function() { el += $(this).val() + '|'; }); return el; } }; here's the explanation: im creating a key-value array where it extracts different values from DOM objects. The last array that yo...

very cool wysiwyg jquery editor problem with browsers design mode

Hi. I have founded a great jquery wysiwyg (rich edit editor), but its use "browsers design mode" to create the html and with this it create HTML and not XHTML. Link: http://premiumsoftware.net/cleditor/ owner says: "CLEditor takes advantage of the browsers design mode feature and does not generate any HTML itself. When you click a but...

Passing dynamically Data Object in the data using AutoSuggest jQuery plugin

AutoSuggest jQuery Plugin requires an already available Data Object in order to run. I need to use the user's selection from the first input as data in the second input. The following snippet throws an error in firebug availableTeachers is not defined var labs = {lesson: [ { ...