jquery

Deserialization problem while posting data (jQuery, json, mvc).

On my site I have simple form (by the way I'm using razor view engine): <form method="post" action="Mail/SendMailMessage" id="mailForm"> @Html.LabelFor(m => m.UserFirstAndSecondName)<br /> @Html.TextBoxFor(m => m.UserFirstAndSecondName)<br /> @Html.LabelFor(m => m.Email)<br /> @Html.TextBoxFor(m => m.Email)<br /> @Html.La...

Expand selected text by one word

The TextRange object of IE has expand function through which you can expand the text selection to complete the word or sentence. It only works for IE. More: http://www.webreference.com/js/column12/trmethods.html It would be great if someone can help me and make it work cross-browser. ...

is my code victim of same origin policy ?

Here is my code. You have to kindly look does it suffer from 'same origin policy' in this shape. The domain for HTML is (http://127.0.0.1/jqload.html) & php file (http://127.0.0.1/conn_sql.php). This is json format : [{"options":"smart_exp"},{"options":"user_int"},{"options":"blahblah"}] I actually want to append json data that I rece...

jQuery show immediate group of Ul's when clicking icon

I have a structure which can have multiple levels e.g. <li> <a class="viewdetails"></a> <input type="checkbox" class="11015-11017" id="11015-11017" value="11017" name="list_data[11015-11017]">&nbsp;Food Service <ul> <li> <input type="checkbox" class="11015-11017-11021" id="11015-11017-11021" value="11021"...

jquery Resizeable malfunctioning in Firefox

Hello Everyone, in my web page i have a table and i want its first column to be resizeable. it works fine in IE8 but on Mozilla it shows resize icon in bottom right corner of the document. this is the code $(".resizable").resizable({ maxHeight: 25, maxWidth: 350, minHeight: 25, minWidth: 1...

question-suggestion list

i have a asp.net page. i m writing some words in a question textbox named txtTitle, after moving to another txtbox named txtbox2, i want that it should open a question-suggestion page based on that keyword typed in txtbox1 in the space before txtbox2. i hv tried this but it is not working. can anyone provide me the all the codes which ar...

jQuery UI tabs, access required to loaded data over ajax on tabsload event

jQuery UI tabs, access required to loaded data over ajax on tabsload event I am using jQuery UI tabs to load content over AJAX. JSON structure of content { content: 'content-data', stats: 100 } The tabs are being loaded by defining $('#tabs-ui').tabs({ ajaxOptions: function(result){ var data = Drupal.parseJson(...

Javascript: call a specific function on function complete

Hi, I have a slow function that does an AJAX request: function X(param1,param2){ var params={ type: "POST", url: "./ajax/useful.php", data: "param1="+param1+"&param2="+param2, success: function(msg){ //do something } }; var result=$.ajax(params).responseText; } Everything works fine when I call X("asdf",...

please extract a bit of info from this string (without regex so that i can understand it)

Hi, On my web app, I take a look at the current URL, and if the current URL is a form like this: http://www.domain.com:11000/invite/abcde16989/root/index.html -> All I need is to extract the ID which consists of 5 letters and 5 numbers (abcde16989) in another variable for further use. So I need this: var current_url = "the whole p...

jQuery: how to print out the text label of radio buttons?

If the code is <form> <input type="radio" name="font"> Arial</input><br> <input type="radio" name="font"> Times New Roman</input><br> <input type="radio" name="font"> Monaco</input><br> </form> <script> $('form input').each(function(i, e) { alert($(this).text()) }) </script> It shows 3 empty strings. How can it sho...

jsp does not display whole animation

when i keep all jsp files in foo folder then jsp show all the graphics, images, css, jquery animation etc. all working fine in foo folder. but i want to keep my all jsp's in jsp folder which is outside of foo folder. it show all the graphics but it does not display jquery animation.e.g when i keep the cursor on a row of table it does no...

sort a droppable tree table in jquery

Hi all, I have a treetable built with jQuery. In this table I can drag a row and drop it on another row, thus creating the parent/child rows. Now within the same parent, I'd like to be able to sort children. How can I combine this sortable behavior with the droppable one? Thanks a lot ...

js file is loading from cached temporary internet files instead of redownloading from server

I have used a external js file for a upload operation in my page.. once the file get loaded in temporary folder, it gets loaded from there even if new changes are made the old version that exist in temp folder gets loaded... i have written Response.Cache.SetCacheability(HttpCacheability.NoCache); on my page But it still loads the js f...

jQuery Validation with Dialog

I have jQuery validation working pretty well using a dialog for the error messages. The problem I am having is that when I click submit, and all the fields are filled out correctly, I have a blank dialog popping up before the form submits. I can't seem to figure out how to stop that from happening. Setting the onSubmit to false will not ...

Installing and Using jQuery Toolbox

I have never designed a webpage before, but I am asked to do this and will be using jQuery. I was wondering, what is the best and easiest way to do this? I thought of doing this on Visual Studio using only jQuery and HTML controls to produce an html page without any asp.net controls. Is this possible? How can I get this? And if you have ...

trigger('change') selects the 1st option, which I don't want

I have a select that has several options. No empty option. Before calling the trigger none of the options are selected, after it runs the first option is preselected, and I want that the select to stay as it was, no option selected $("#selProduct").trigger('change'); How to fix this? I still want to trigger the change, to run the eve...

jQuery Accordion Menu

This is just a really novice question on jQuery but I'm just using it to create a simple accordion menu. The HTML ouput is like this: <ul id="nav-sub"> <li class="sub-level-0"><a href="#">Menu Item One</a></li> <li class="parent-here last sub-level-0"><a href="#">Menu Item Two</a> <ul> <li class="here sub-level-1"><a href...

Extracting the javascript from an anchor's href using jQuery or JavaScript

Does anyone know an easy way to use jQuery (or other Javascript if necessary) to extract only the Javascript portion of an anchor tag's href attribute (like the one below), so it can be assigned to another event at runtime? <a id="FancyLink" href="javascript:DoSomething('Input1')">Do</a> I know how to get the anchor's whole attribute ...

.text() on change jquery

Hello, <td><span id="v">77483.2231</span></td> When the #v value changes I want to get an pop-up alert $('#v').change(function() { alert("ok"); }); That's my code, its not working though, what could be wrong? Thanks Jean ...

How do I read a GET variable from JavaScript/jQuery?

How do I get a particular GET variable in JavaScript or jQuery? I want to pass it on in ajax script in this sort of way: $.ajax({ url: 'foo/bar.php', data: { search: $(this).val(), page: something //$_GET['page'] only in js }, ... ...