jquery

html tags inside xml tags - how access in javascript?

I'm passing my xml data through php where all xml nodes are contains html tags <bccfalna-ad> <ad-id>99</ad-id> <ad-title>New Ad</ad-title> <ad-code><u><b>C Language</b></u></ad-code> when i access this code in javascript, its easily access ad-id and ad-title but it always print null for ad-code node var edit_ad_id = xmlDoc.getElement...

Jquery: textarea preview (simple and small script)

Simple way to make a preview of a textarea? the code i have below wont format <em>i'm italic!</em> into italics. I'm not very good at js/jquery, and i don't know if the .replace() part is what i need to focus on or what. I've googled it and searched here and couldn't find a simple answer. $('.comment-block textarea').bind('blur keyup',f...

HTML form w/ method = "get" VS. JQuery $.get

I have an embedded application running httpd for a web server. On the main page I have two buttons. One uses JQuery to add a click event with the following code: $.get("example.cgi"); The other button is the submit button for a blank form (i.e. other than the form tags and the input with type = "submit" the form contains no fields)...

How to update a usage of jQuery jqGrid version 3.5 to the current version 3.7.2 ?

Let's say we have the jqGrid in our ASP.Net MVC 2 application, e.g. Craig Stuntz's demo source code on his blog, and we want to update the grid's codes to version 3.7.2 (currently when this question is being asked). How can I do it? Which steps should be followed? I found here from the internet (trirand.com) but there's nothing related ...

Load website in iframe dialog, save open and close time, jquery

Hi, I found an example that shows how to load a website in an iframe using jquery, link My question is, is it possible to get a timestamp of the opening and closing event of dialog that displays the iframe? ...

Setcookie won't work?

I set the cookies regularly in a callback page in my Twitter application. Everything works fine. Now, using jQuery, I submit a form, and the callback function activates a PHP script. That script only needs to set one cookie to the serialized values of $_POST; and the values run fine (both serialized and normal, I echoed them out to debu...

Jquery +html table

how to find the html or controls of next td using jquery in an html table? ...

How to get a list of all elements that resides at the clicked point ?

On user click I would like to get a list of all elements that resides at the clicked point. For example, if user clicks on Hello here: <div><span>Hello<span></div> I would like to get the following list: <span> element <div> element <body> element <html> element What would be the easiest method to get these elements ? ...

jquery navigation

Hi, I am creating a simple nav for a site landing page. It directs the user to one of two sides of the clients business and basically consists of the screen being divided in half as you roll over one side the other fades out. My code: HTML <div id="homeNav"> <a href="retail.html" id="retailNav">Retail</a> <a href="residential.html" id...

jQuery AJAX success callback : Can I see the headers sent ?

I am making an AJAX request via jQuery's $.ajax() method. I have specified a success callback using : $.ajax({ ... success: function(data, textStatus, xhr) { ... } }); Is it possible to see in the callback what request headers were sent ? For example, to retrieve a specific request header value ? EDIT: The requir...

TableSorter loses header text

I'm using tablesorter in an asp:GridView and works fine but this been bother me for some time Every time there is a button action (firing up a call to the server, refreshing the page), table sorter loses the headers as you can see by the 2 images below: before refresh: after refresh: Does anyone have an idea of if this might be a...

Refactor $(document).ready(), currently have 2 instances.

Hi all, I've got following JavaScript functions but want to refactor the $(document).ready() as I've got 2 instance of it. How can I achieve this? FlashMessenger = { init: function() { setTimeout(function() { $(".flash").fadeOut("slow", function () { $(".flash").remove(); }); ...

jQuery Validate: How to validate a non-form element?

I have a form that has an attached map. Clicking on the map adds hidden inputs to a div in the form. I want a validation rule to check whether or not that div has any hidden elements. So far, I've only been able to do this with a dummy element that I have to manually remove before posting the form: <form action="..." method="post" id="...

JQuery UI, help improving code.

I have the following. <ul class="sortable"> <li> Some Title <ul class="sortable"></ul> </li> <li> Some Title <ul class="sortable"></ul> </li> </ul> I then use the following JavaScript to make items sortable. $(function() { $(".sortable").sortable({revert: true, connectWith: ['.sortable ul']}); $('.sortable u...

affiliate in iframe, jquery

Hi, Does an affiliate site work when I display it in an iframe? On my website I have an ad link of a partner. I want to display it in an iframe, that is wrapped by an jquery dialog. The user should be able to use the partner site in the dialog just as a normal website and to shopping ... Is that possible? ...

What's the difference between : 1. (ajaxStart and ajaxSend) and 2. (ajaxStop and ajaxComplete)?

Basically that's the question (parentheses are important) ...

jQuery ~ Two click events overlayed?

I have a container element say <div id="myContainer"> <form action="" method="post"> Radio: <input type="radio" name="myRadio" id="myRadio" value="1" /> </form> </div> So if I assign a click event to the $('#myContainer') and also a click event to $('#myRadio') is there a way to get them both to fire? Currently, because there i...

Append jQuery UI dialog to ASP.NET form on document ready

I have jQuery UI dialog with ASP.NET. I wrap a list of check boxes in the dialog. Since, it's an "Edit page", some of the checkboxes are already checked because the data fetched from datatbase when page is first loaded. I have no problem when I click on the link to open dialog, and everything works as expected. However, if I don't cli...

JavaScript - Invoking Methods that Reference this

Not sure what I'm doing wrong here, I just want to be able to have functions of an object reference the object scope myscipt.js function MyFoo () { this.name = 'myname'; } function MyBar () { this.myFoo = new MyFoo(); function setMyFoosName( name ) { this.myFoo.name = name; } } somepage.html <scipt> $('document'...

Jquery Finding first Row

how to find first row of a table using jquery? ...