Any jQuery function only to send data to servlet?
Hi. I'm looking for a jquery function that only sends data to Java servlet. jquery.get('url' , {name: "soichi"}) does send the data (in this case, the name) to the servlet. But I want the servlet to create a new HTML page based upon the sent data and to redirect to it. So, maybe I should write in Java, public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String text = null; text = req.getParameter("name"); resp.setContentType("text/html"); resp.getWriter().print("<html><body><h1>"
Joomla module in superfish menu
I want to have a drop down menu that reveals a menu position in the drop down, not a <li>link</li>. The module has a login / password / registration form. I tried to use a javascript to hide / un-hide but couldn't get the absolute positioning to work. Any Ideas? Thanks, super
String to Script
Hi All, This is the first time I am using JQuery for simple script execution. Here is my issue, I am using a charting library for generating the charts. The number of charts and data of the chart is dynamic. So I have generated the chart script on the backend using strings and stored the whole script string in a session variable. I am using struts2 and JSP for the front end. When I retrieve the session variable, it comes out as a string. How can I convert this to a javascript.
Click on transparent margin to be handled as click on page background
How to ensure that a click on a page background image is handled by the bg click handler when the user clicks on the transparent margin of a div in front of the bg image? The div in front of the bg has a separate click handler. The difficulty lies in the fact that the user sees bg around the div (as he is meant to, since the margin is transparent), and when clicking in the margin will expect to get the bg click handler, not the div click handler. The divs, in case it matters, are in fact li elements
Help with first jQuery Slider
Hi. I am a web designer new to jQuery, and I am currently working on designing my first jQuery Content Slider for my website. I currently have what is a basic slideshow: <script type="text/javascript"> $(function(){ $('.slider-content img:gt(0)').hide(); setInterval(function(){ $('.slider-content :first-child').fadeOut() .next('img').fadeIn() .end().appendTo('.slider-content');}, 1000); }); </script> The goal is to make
How to change ID after $.get()
How can I set the ID of a div after doing a $.get(). The point is to make it so that each piece that gets added using this function will have a uniqueID. Everything I try seems to fail, I'm guessing its because the fragment of html that I am appending isn't in the document when i go to search for it. I'm new to jQuery but I'm sure this isn't as hard as it seems. var uniqueCounter = 0; Add('Container.aspx', '#content'); //The default id of div from conatiner.aspx fragment is 'Container.aspx' for
Selector question using find
Hi. I cant for the love of god find the correct selector syntax for selecting elements based on their names. Here is the fuzz, i need to select all elements beginning with "video-", the element for example: Here is an example of my xml elements, contained in a variable called xml. <video-270p/> <video-360p/> <video-720p/> This would be my regex approach: ^video\-(\d){0,9}p var video = $j(xml).find(wtf); <- help :)
Error message in IE8, functional in Firefox.
Simple routine to fadeOut a <div>, change the src in the <img> tag and text in the header, and then fadeIn the <div>. Works fine in Firefox, receive this error in IE8. New to Jquery, not sure where to look for a solution. Message: Unexpected call to method or property access. Line: 16 Char: 66797 Code: 0 URI: http://www.broncosoccer.com/jquery/jquery1.5.1.js $(document).ready(function () { // EXPANDED IMAGE DISPLAY // $(".imagePanel").mouseover( function () { var playerName
Drop a record - request to a php script
Hello, i have a table with data records. Now i want to set a link to remove a record in the database. I want to this with a ajax request, because the url should not shown in the browser url-field. Have anyone a hint?
suggestion for FAQ and/or Set up section
I suggest that the jQuery FAQ section have a Q&A with details about setting up the script tags to get jQuery working via CDNs. The code download info seems OK, though I haven't used it, but I want to use a CDN because I don't have to update jQuery during a long development cycle. The CDN does it for me. Current information on the jQuery site says CDNs exist, but doesn't describe how to put the script on a page. This instruction should be in the FAQ and/or the Set Up section, and should be in
Combining jQuery with other plugins.
Ok, so I have 2 scripts. 1. On/Off iPhone switcher 2. Stylesheet changer using jQuery I want to combine these 2 plugins into one, my main idea was: when you switch to ON(day) on iPhone switcher.. the Day Theme would appear (day.css) and when you switch to OFF(night) on the switch the Night Theme would appear (night.css) . And also, can I set the themes to change automatically depending on the GMT using these 2 plugins? 7AM to 6.59PM Day Theme 7PM to 6.59AM Night Theme Or this would involve PHP? http://vlad.dyndns.org/1/
JQuery Ajax post not working on Mac (Safari and Firefox)
Hi! My website has a JQuery dialog with a textarea where the user can type a text and submit. The submit is an ajax request to the server. This is the code: $('#textEdit').dialog({ show: 'fade', hide: 'fade', autoOpen: false, modal: true, resizable: false, closeOnEscape: true, width: 520, height: 310, buttons: { "Update Content": function() { var newText = encodeURIComponent(getRichTextContent()); var url = "../../adminnew/updateText.php"; var pageNumber = document.getElementById('currentPage').value;
$.getJSON content type?
Hi, I a writing an application using jQuery talking to a spring MVC backend. I've set the controller up to return JSON by using the @ResponseBody annotation in my controller. This works by looking at the content-type to determine the output. It means I can just return a POJO and spring will automagically convert to JSON. My problem is it doesn't work with $.getJson. This procedure looks like this in jQuery 1.4.4. getJSON: function( url, data, callback ) { return jQuery.get(url, data, callback,
Cannot get a success message to display after form is sent (after validation).
A website I'm designing – vgdesign.net/thc – has a form in the footer. It functions how I want right now (to my knowledge) except for the fact that after a user submits a form and it passes validation, I want a message to be displayed that says "Thank You". I have a class created for this in my stylesheet but I don't know how to trigger it when the form is sent successfully. Essentially, I would like the result to look like this: If the form doesn't pass validation, I want it to not display until
Using Jquery for my friends system.
Hey there all, I've been busy with this for a while and I'm trying to learn Jquery but I just can't get it right. I currently have the following code for my add friend and delete friend. <?php if($user->isfriend($_SESSION['GoT_username'], $userinfo['user_id'])){ ?> <a href="index.php?act=delfriend&friend=<?= $userinfo['user_id'] ?>" title="Vriend verwijderen"><img src="images/Error-32.png" height="20" width="20"></a> <?php }else{ ?> <a href="index.php?act=addfriend&friend=<?= $userinfo['user_id']
Random Image Issue
Hello, I'm currently trying to set up a splash page that loads a random image from about 20 or so images. I've found multiple jQuery scripts that do this. The problem is most require a JavaScript file to be edited, aka an array. I'm curious is anyone aware of a way that would allow a certain div to be targeted, so any image inside of that div would randomly load? This way images could be added by a friend in Wordpress and still load random for example without editing the JavaScript file? <div id="randomImage">
jQuery not working on IE!
Hi there.. I am having a huge problem. I wrote some code in jquery that does only a few animations and It doesn't work in IE. In firefox,google chrome and safari works fine... What am I missing? Could you please give me a solution to my problem?? thanks a lot the website that overflows is www.lolipopart.gr/index2.html
getJSON() and nontrivial JSON data
I have used getSON() successfully before but I am meeting with an issue which I don't seem to get a hold on. The data object returned is not populated correctly by getJSON(). Am I doing something wrong? The data I am getting back has this kind of JSON structure: {"Rows": [ { "id": "3", "name": "Ron" }, { "id": "5", "name": "Liz" } ] } And, I have tested the WS call directly to see the raw JSON stream. It is correct. So, there's nothing wrong with the server code that I know of. The test code
Problem with noConflict
Hi - I need to use prototype with Jquery - I've tried using noConflict in all the ways that the JQuery documentation suggests, but I am not having any luck. I can get toggleClass to work, but not slideToggle, and I'm having issues with plugins (cycle and fancybox) as well. Is there another good resource besides the JQuery documentation about how to use noConflict with plugins? I'm just not sure why some of it is working, but not all of it. Thanks, Erin
Beginners question - how to get .closest() working? Any jQuery Blackbelts here?
I have quite a few links or input buttons on my page which should toggle one of two folders: .negative and .postive However, whilst the code below works, when I click a .posHide button it toggles ALL the .positive and .negative DIV's. I've tried using .closest() to get this to work but can't. Can any jQuery blackbelt explain to me how I change the code below so that each instance of .posHide only toggles the nearest .positive and .negative divs? // toggle error messages $(function() { $('a.posHide,input.posHide').click(function()
jquery ajax get download file
$.get( url: downloadUrl, function(data) { //after get the data, how to ask browser pop up to save file? } ); data is content dumped by server side servlet. can be binary.the purpose of doing ajax get is need to put some custom header before do get
Css sprite & jquery
greetings, Im trying to solve a problem on my new portfolio im working on. The problem is with css sprite & jquery, but in fact all is working fine with Firefox and not with internet explorer (8). here the code that make problem (i think) : <script type="text/javascript"> $(document).ready(function() { $("ul.gallery li") .animate({opacity: '0.4'}, 1) .hover(function() { //On hover... var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
call before .ready and .load
I have a page that has a lot of data returning and I need more room so I decided to use jquery for a column so if they click on it, it opens a colorbox/lightbox with a new page based on querystring with the corresponding data. I can get this to work but my issue now is that the page takes up to 10 seconds to load and the jQuery isn't working until after 10 seconds. I need a way to either disable that link or have a loading show until the page is ready. So, is there a jQuery function that is before
[jQuery] Styling and modifying the MultiFile plugin
HIi I would like to know how one can syle the multifile plugin, I would also like to change the placement or make the file queue invisible. Does anyone have any idea how I could go about that? Thanks
ajax.load() seems unable to load HTML5 tags under IE
Hello, I have a problem when trying to load an HTML5 element with Ajax (jQuery.load ()). Here is a simplified example of the problem. Main page : <!DOCTYPE HTML> <html> <head> <title>Title</title> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script type="text/javascript" src="js/jquery/jquery.js"></script> <script type="text/javascript"> <!-- $(document).ready(function() { $("#loadDivHere").load('ajax/test-ie.php #myDiv');
set name parameter does not work in ie7
Looks like attr("name","value") method is not working to set name attribute value for input type in IE 7. It works fine in IE 8 and other browsers. Method works fine for other attribute in IE 7 e.g. id attribute While setting name attribute it sets 'submitName' attribute and not 'name' attribute. Somehow IE 7 is not allowing to set name attribute dynamically. Test case: http://jsfiddle.net/zRFnz/3/ I also posted bug to jQuery bug report i.e. http://bugs.jquery.com/ticket/8418 But this issue is showstopper
Datepicker default date set to last week
I have a fromDate and a toDate input box both populated using the date picker. For the default Date how can i specify it so it always uses last week starting from Saturday and going to Sunday and not the current date or a fixed date? defaultDate: '-1w', i was trying something like this var date = new Date(); date.setMonth(date.getMonth() + 1, 1); but for the date not the month, couldn't get it working, anyhelp? Thank You.
Multiple Dependant Comboboxes
Hi I am fairly new to JQuery so please bear with me. I have a page which currently uses Stanislaus Madueke's adaptation of Remy Sharp's chained selects script. The first combobox is a choice of countries, the second is a list of professions appropriate to the country chosen in the first box. What I want to happen is, once the profession has been chosen then a series of options appear below based on the country and profession. Which options are shown will be determined by an array of ID numbers retrieved
Problem with opening dialog 2nd time
Hi folks! I have a problem with opening dialog second time. I have a button which open dialog but it works every time only one, and if I close this dialog I can´t open it second time, before refreshing page. Can someone help me with this? Thx Here is code: <script type="text/javascript" > $(document).ready(function(){ //define config object var dialogOpts = { modal: true, bgiframe: true, autoOpen: false, height: 420,
JQuery to drag and drop images in to grid and snap to grid
Good day, I am new to JQuery and Javascript. I need to vreat the follwong and has tried alot of cobinations, but cant seem to make it work. The following needs to be done: JQuery to drag and drop images in to grid and snap to grid. I have a html doc with 2 grids on it currently and in the one grid is 6 images. The other grid is empty. Need to drag images to clean grid. <script type="text/jscript" language="javascript"> $(document).ready(function () { $("img").draggable();
jQuery website width too narrow
Hi, I like jQuery and the website is nice there is just one thing I hate and can't stand and are totally flabbergasted about. Why is the main content so narrow? 50% of the screen is not used. I little ironic having wonderful jQuery. I'm not sure who updates or maintain the jQuery website but please make it wider or add an option to view it wider. Thanks,
Background-position animation conflict with other Jquery script
Hi, I'm an absolutely Jquery Newbie! I've included in my project website a Jquery Script called LittleBoxes following this online tutorial : http://tympanus.net/codrops/2010/05/18/little-boxes-menu-with-jquery/ It works fine! the problem is that now I've tried unsuccessfully to add an hover effect to the little boxes with the jquery.bgpos.js, when I use this script alone as in this test webpage : http://www.dirtyballet.com/TESTING/hover.html the background-image position is correctly animated by
show yes/no alert before trigger button
hi how can i show a yes/no alert before trigger a button click? suppose i have code like this: mybut.live('click', function() { //delete some records... })now, i want to get an confirmation form user, before proceeding delete records.
using .get()
i am trying to get the contents of a php file into a div. however none of the php code is inserted, it will only insert html(stuff outside of the <?php markers). function preview() { var content = jQuery('#message').val(); jQuery.get('parser.php', {content:content}, function(txt){ jQuery('#preview').html(txt); }); }; jQuery('#message').keyup(function (){ preview(); });and my parser.php page(as a simple example) <?php echo 'boo'; ?>
Adding a class to current link
Hi, I've seen this on many sites where the current link in a menu is styled. How do I add a class to a link that is active? Thanks for any help or pointers. Joe
Sliding Jquery Menu question
I am trying to figure out how to get this slide out Jquery menu to work. Here is a link to what I am doing http://scottjraney.com/javatest/ I will describe what I am trying to accomplish. 1. When you click on a link, the content related to that link dynamically loads into a slide out Div (this has been accomplished) 2. When you click on another link after the previous action the menu stays visible but loads the new content (this has been accomplished) 3. When you click on the same link a second
Weird Safari Issue
I'm having a weird problem in Safari when I refresh the page. I'm using the fadeIn and fadeOut to display an info menu and am also using slideToggle to slide a menu down when a link is clicked. For some reason, these actions work when I first load the page, but when I refresh it, these actions don't work at all. I am not having these problems in chrome or IE. Anyone else having this problem?
fadeTo and IE9 RC
Im using fadeTo (From 0 to 1) on a div in my homepage. it works fine with all browsers except IE9. while fadein the div jumps to different position on the page , 200px left and sometimes works fine for 1 sec and jump again... does anyone know how to solve this? my website: http://www.taxteam.co.il/ thanks
Syntax Error
I'm trying to put all my scripts into one script file, but when i put jquery in nothing will work because of a syntax error in the minified version. Starting on line 69 there's a quotation mark missing somewhere causing it to not close which in return messes up my comments and scripts below jquery. The uncompressed version doesn't have this error, and i would use it in the file instead except that its over 6000 lines, and makes the filesize large.
Menu and plugins
Hello, I've Wordpress 3.1 installed on my site ( www.caae.cl/wordpress ) First, I used a menu which I found here : http://www.webdesigndev.com/web-development/create-the-fanciest-dropdown-menu-you-ever-saw I installed the menu on a HTML page where I designed everything. It worked perfect. Then I used the HTML and CSS that I've created and used it on my WP theme. It still worked perfect, I was using jQuery 1.5, even thought the menu is supposed to work on older versions (it was made in 1.3.2) The
Next Page