Transaction with JQuery
Hello to all!! I use the following code with jquery to realize the load of content of other pages of my web in a div. Well then, from links of out of the div, it works without problems, but when I want to load a link of inside the div, recharges the entire page, instead of only the div... And, in addition, it me does not execute the codes js of the pages loaded in the div. Some solution? Here I leave the code you: <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript">
how to find parent ID?
I know this might seem like a newb question, but the following returns nothing for me, except a blank alert box... $('.editPt').click(function(){ alert( $(this).parent().id ); });here is the HTML <tr id='tr_1'> <td id='td_1' title=id class='editPt' > 0</td> <td id='td_2' title=mrno>17730</td> <td id='td_3' title=Patient></td> <td id='td_4' title=ptType>heme</td> </tr> etc.... Thanks for any help in advance! jQuery Newb
little problem with form after reloading
can anyone take a look at this script? http://www.pastie.org/843195 When I submit the form for the first time and the result is indeed not NaN, everything goes fine, but when there's an error, the form gets reloaded, and I submit a second time, the "addToList()" function (line 60) is not called, however the "unloadPopup()" function (line 61) IS called. I can't figure out what's going wrong here...
Expected behaviour?
Hi all, hope all is well :) I have started using jquery today (woo woo) and I am attempting to use some of the animation features (namely .animate). Got that working all fine, however, when I set the opacity to 0 on the .animate, youtube videos don't fade away. The routine goes, click link -> content fades -> get html (async) -> load html in dom (all fine up to here) (content fades back) -> load embedded youtube -> click another link -> youtube doesnt fade Would you expect it to behave that way? I
Find Id of parent... not working....
Can someone show me why this is not working... Im trying to get the ID of the parent TR of this table when a TD is clicked... the following returns an alert box with nothing in it... $('.editPt').click(function(){ alert( $(this).parent().val() ); });the html looks like this <tr id='tr_01'> <td class='editPt'> some info</td> </tr> Any help for this jQuery newb would be wonderful... "we are the cult of personality"
Helping hand please
Im trying to use the colorPicker plugin to make a little page. My code is giving the error 'Uncaught SyntaxError: Unexpected end of input' <html> <head> <script type="text/javascript" src="jquery.js"></script> <link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" /> <script type="text/javascript" src="js/colorpicker.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#colorpickerHolder').ColorPicker({ flat: true, onChange: function (hsb,
Changing background image on the fly via string - Only works in FF
Hello, I want to let the user change the background image via a select box: jquery: $("#selectOverlay").change(function() { var theOption = $(this).val(); $("header .inner, .overlayBottom").css("background-image", theOption); }); html: <form action=""> <select id="selectOverlay" name="selectOverlay"> <option value="url(images/backgrounds/paper.png" selected="selected">paper</option> <option value="url(images/backgrounds/leather.png">leather</option>
ajaxComplete after Load - problem with cache?
I have code similar to what is below. I am having problems with IE where ajaxComplete is never fired. I beleive the problem is due to the menu being cached on the first request. Any advice is apperciated. $(function(){ $('#Menu').load('/menus/jsmenu.html'); $('#Menu').ajaxComplete(function() { $('.accordion .head').click(function() { $(this).next().toggle('slow') return false; }).next().hide(); }); });
Multiple Popups on one page
i am using YensDesign smooth popup. i have created an area map, that i can get 1 popup to showup: when i try to add another DIV ID to show a unique popup, it fails... i am new to JS, so go easy on me... do i need to create some type of an array? <<div id="popupContact"> <<a class="popupContactClose">x</a> <<h1>Title of our cool popup, yay!</h1> << <</p> <</div> <<div id="popupContact2"> <<a class="popupContactClose">x</a> <<h1>22Title of our cool popup, yay!</h1> << <22sutff goes here <</p>
s3slider content extent from right to left
I just integrated a slideshow in Wordpress using the s3slider script. In example 3 here http://www.serie3.info/s3slider/demonstration.html it shows the content appearing from either left or right. I aligned mine to the right but is it possible to make it extend from right to left instead top-bottom?
Help needed - Binding a hotkey function to element with focus
I am binding a function to a keydown event. I am using the js-hotkey plugin which is working fine independently. However when i add a function to bid too im having problems. Heres my code.... //identify input with focus $('input[name=autoSaveOrderItem]').livequery('focus', function() { //identify id of row with focus var row = $(this).parent().parent().attr('id'); //F6 duplicate item line $(document).bind('keydown', 'f6', function (){ duplicateOrderItem(row); //return false; }); }).livequery('blur',function()
Noob question about scope with .each
I've been scouring the forums and online searches, but I can't find an example that helps me so hopefully someone here can. I'm building a list using the results from a PHP call using $.get. Inside the callback for $.get I use a .each call to iterate over the results. Within the callback for the .each call I am building each line item for the list of results and I want each result to have an onclick handler that will call a javascript function to select the line item. My problem, I think, is
Add handler to Ajax loaded content
Hi all, I'm trying to bind an event handler to a button in a page loaded via Ajax. This procedure should apply to every page I have to load via Ajax. I have tried two things: first, I declared the 'click' event handler for the button like this, and just did my ajax request. Here's the code: $("#close_button").click(function(){ alert("This should popup"); }); $.ajax({ url: 'js/ajax/text.html', success: function (html){ $(childDivSelector).html(html); }, error: function (request, status){ alert("Error
Using .html() , .append() function with XML files.
Hi, I have read that these functions do not work with XML documents. I have a XML file with html tags in it to use it as a print template. XML file ......... <html> <body> <div id="SpeedPost"> </div> </body> </html> I have a js file "mails.js" I want to add "<table><tr>Newpost</tr><table>" to the the speedpost div using .html(), will it be possible by adding something like this to my mails.js file? $(#SpeedPost).html("<table><tr>Newpost</tr><table>"); if not how can it be
Using jQuery with Flux Screencast
Hi, We've just created a screencast demoing jQuery with Flux (our Web design app for the Mac) http://www.theescapers.com/screencast/ Click on the "Javascript animation" one. Enjoy! Moray Partner The Escapers
JQuery Ajax call failure from a clickable image
I had a first post "Failure with jQuery ajax call" But my work of this day helps me to localize the origin of the problem. I made a very, very small project with a simple form one input field (in fact it is not used) one image (clickable) one button <input type="text" id="setNom" value="admin"/> <input type="image" id="validNom1" src="ok-16.png" alt="valider" title="valider"' /> <input type="button" id="validNom2" value="OK" /> <validNom1>
RegEx in JQuery
Hi, Is there a way i would be able to check the value of href in my anchor tags using regex? I'm finding it hard to understand regex.. and i want to validate a certain url in this format? All (*) are wildcards - any value can be placed on this *. http(*)://*.mypage.com/* and then if a certain href matches the format, i will set the target of the anchor tag to open on the same window. thank you so much for the help in advance.. :)
colored scrollbars in chrome when fading divs
Hi, I have 2 divs with scrollbars on top of each other and will fadeOut the top div. When doing this the scrollbars are changing in all kind of colors. How can I do this without messing up the scrollbars?
HOW TO CALL EVENT ONLY ONE AT A TIME
Hi I have used onChage and OnBlur for textbox. Generally it calls both if we change something in textbox. I need to call only one if we change something then onChange if we don't change then onBlur event. <input class='rowstextfieldleftborder' id='TEMP_ORLN_STK_NAME' onChange=savedata('" + col + "','" + row + "') onBlur=savedata('" + col + "','" + row + "') type='text' value='" + $value + "' /> Can you please tell me how to resolve this issue? Note: the above control will generate dynamically. Thanks
json tab on firebug
I have seen that firebug is not showing json tab when calling $.ajax with async = false Is this a jquery error or a firebug one? The code is $.ajax({ async: false, dataType: 'json', success: function(data) { dateFormat = data.date_format; translations = jUI.Utilities.merge(translations, data.translations); }, url: '/contacts/data' });But if I make the call with "async: true", then the tab is visible
Problem while using load() (not the same result as PHP require() )
Hi, I have a problem with load(), I use it this way : $('#photosets_content').load('photos_content.php');But the result is very strange, it's like the jQuery functions of those pages are not taken in account. I tried to insert the js including once again (call jQuery and my js.js page where I have my functions) but it doesn't change anything. Just for a try, I replaced the function by php's function require(), and it works perfectly well, no more CSS or JS error. What could be the problem ? I tried
.load() method's result: how do you know it's finished loading?
I'm working on a website concept that utilizes David DeSandro's jQuery Masonry plugin along with some code inspired by Paul Irish's Infinite Scroll plugin (I couldn't get the plugin to work so I wrote something similar myself). I've done the integration so the basic concept that I have does work. I'm firing jQuery's .load() method when someone scrolls to the bottom of the page to load the next portion of the page. In the callback to the .load() call, I call the jQuery Masonry plugin to create the
Thickbox issue with ie6
Hello, I'm using the thickbox, if the page is fit to window, its displaying properly, but if there is scroll, only half of the page is overlayed, remaining page is not overlayed... i know its issue with tb_position function, i tired all the solution,but nothing is worked out. solution from anyone? Plz. thanks
message on navigating to another page
If a use makes some changes on a web page and tries to navigates away from the that web page, I want to give a message in dialog box - "you have unsaved changes." cancel to stay and continue to loose changes and go to new page. How to detect a) user is navigating away from the page b) There are unsaved changes and c) Give dialog with stay or continue
migrating from 1.2.6 to 1.3.x or 1.4
I am currently on Jquery 1.2.6. Has anyone migrated from 1.2.6 to 1.3.x or 1.4. Any reasons to do so? Is Jquery backward compatible? What about jquery ui and other jquery plugins? How did you handle it? How much effort was it?
Double click on a toggle doesn't work
Hi Everyone, I am evaluating jQuery for my forthcoming project. I have found/noticed an issue in the jQuery controls. Assume there is a toggle menu. The toggling has been controlled through single click. Now if I double click on it, it stops toggling. In fact I have to refresh the page to toggle it again. I am using Mac OSX Leopard and following browsers. 1. Safari 4.x 2. Firefox 3.6 3. Google Chrome: 5.x Is it a usual behavior? Is there any workaround/fix? Please provide me some solutions. Thanks,
why does this code work in step through, but not in real time (show spinner, followed by load)
Hi, Why do I not see the spinner image when I run this code? However when I debug through it using firebug I do see the text/spinner image at the beginning: <div id="spinner"> <img src="/images/ajax-loader.gif"/> Text </div> <div id="events"> </div> <script type="text/javascript" charset="utf-8"> function load_events() { $("#events").load("robots.txt"); } $(document).ready(function(){ $("#spinner").show() $("#events").hide() setTimeout("load_events()",2000); $("#events").show()
Open ajax call using .click function?
At the moment I have a link in a div that targets an ASP page to remove an item from the database. <a class="small" href="/products.asp?Action=RemoveProduct&ID=<%=(rsCartItems.Fields.Item("ID").Value)%>">remove</a> What I could like to do is use JQuery .click and .ajax methods but the only thing I am unsure of is hot to get the ID of the a href tag containing the unique item ID that relates to the db record. Can I use this.id? <script> $(document).ready(function(){ $(".removecartitem").click(function(){
BUG: Opacity 50% on hover, Text edge becomes Fuzzy in FF?
Hello, So with the help of a member here I just finished making a demo page of what I've been working on. What I wanted to do is have a set of 6 DIV's at 100% opacity, then when you hover over one of the DIV's the other 5 fade to 50% opacity. Anyways, It works in all browsers but I'm having a weird visual issue with FireFox. Here is my Demo Page: http://www.joblesspunkdesigns.com/comp/header/header.html here is the jQuery: $(function() { $("div#header .navbar").hover(function
How Do I Make Elements Inserted by AJAX Request Respond to Events?
OK, using $.get() and insertBefore() work great for what I'm doing. But, the data I insert does not respond to events that I have set up. I'm not surprised by this. I'm sure there is something extra I need to do. But, what is that? Thanks for your help. Cheers! Michael
Can't get a response from POST
Hi all, I am trying to get access to an XML response from a POST. Here is my code: $.post(host, request, function(data) { alert(data); }, 'xml');host is a standard URL and request is an XML document... The function (alert) never gets called. Any ideas??? Thank you in advance!
Is get() necessary to access std JavaScript properties?
For example, I have the following piece of code: if ($("#selPayment").get(0).selectedIndex === 3) { I have found I cannot access the selectedIndex property unless I preceed by get(0). Am I missing a simpler way of getting at not jQ properties from a jQ object? Many thanks ~
Rich Text jQuery
Hi Folks, I'm wondering if there is a nice rich text editor for jQuery out there? Maybe someone can suggest a plugin?
Need help with accordion
I did a visual for a client using the jQuery Accordion I had seen at Web Designer Wall http://www.webdesignerwall.com/demo/jquery/accordion2.html Here is the visual http://robcubbon.com/dev/usunlocked/how-it-works-6.html I did this just by putting an image within a <p> tag. The accordion is set to hide and display the <p> tag when one of the <h3> tags is clicked. Trying to turn the images into HTML has proved problematic as there are three different columns of text. I've tried putting a table inside
problem with $.getJSON( )
Hi all, I am having an issue with json returned from my server. I keep getting the following error when jquery executes this function: <code> // process the data (runs the xml through httpData regardless of callback) data = jQuery.httpData( xhr, s.dataType, s ); </code> Error: $lineinfo is undefined Here is the json i am returning from the server. any help is much appreciated. ({ "id": "9f21a504-7e77-4aaa-8851-68530e424d7c", "nm": "SampleName", "tp": "4", "vr": "1.1", "lc": "EAE4CB33-113D-450B-A221-1B6565C51465",
form validation issue
Hello, First I will provide some background information: I have about 20 pages that use 3 forms for a contact us page. On any given page only 1 form should be displayed. Initially all 3 forms are hidden by using (style="display:none"). I then use .show to display the corresponding form. My objective is to create a js file that validates all forms. Currently when I load a page I get the following error: "Error Validating information". This makes me believe that my js file is having a tough time finding
Error in unwrap() method
Firebug Report the following error on using unwrap() method head is null http://code.jquery.com/jquery-latest.js Line 5093 Thanks, -Asim
How do I match classes on buttons only?
Hi, I'm using the latest version of JQuery. How do write an expression to match multiple classes, but only for elements that are inputs of type="button" or type="submit"? I have figured out how to match multiple classes with the expression ... $('.cancelAction, .userLogOut').unbind('click'); but have not yet figured out how to apply that to only input buttons. Thanks, - Dave
calculating column totals in multiple tables
I'm a relative newb with jQuery but I've managed in the past to cobble together a few simple scripts. I've got a new challenge and I know I'm 'in the zone but I need some help. I have an html page, with numerous tables in this format: <table class="tableClass" id="tableID"> <col class="date" /> <col class="reference" /> <col class="amount" /> <thead> <tr> <th class="date">Date</th> <th class="reference">Reference</th>
Copy Div and into another DIV
Hi, I'm struggling to get the correct code for this. I have a page with images and text. The image and text have their own Div's which have a class of either portimage or porttext I want to be able to click on an image and for the text of the following porttext div to be displayed in another div called pinfo. This is the code I have so far. The jquery... $(document).ready(function(){ $('.porttext').hide(); $('.portsite').click ( function () { var str = $(this).next('.porttext').text();
Next Page