how to popup jsp
Hi all, <a title="Supported Products for <%=mdb.getName()%>" id="supported" style="position: relative" rel="#supp-prod-000<%=j%>" href="#supp-prod-000<%=j%>">Supported <br /> Product</a> when i mouseover on a tag, display values on popup, those values are in another jsp . So how can i load that jsp and popup those values. Thanks Murali
jQuery Cycle! Internet Explorer 7 "z-index" Problem
hi friends; i created a site that works, and this study will use the slides. i found the jQuery Cycle plugin for the slide. menus and slide tables z-index, position:relative or position:absolute CSS settings, such as Internet Explorer 7, the codes do not work though. could you help me? problem stems from me!? or! jquery plugin in the browser is having problems!? Internet Explorer 7 test & demo address: http://www.m2-stil.com/bekocanlar/ note: i'm sorry for my english (: thanks for all..
targeting xml grandchildren
NEWBIE Blonde moment! I have a xml document (static) that I need to test what is in a grand child element. The real application is a jqGrid. I have a onSelectRow operation going on. I can click on a row and get a response (in a alert window) for any root children. But how do I do this for anything deeper in the tree? A portion of my xml is attached. Here is my onSelectRow function: onSelectRow: function() { var gsr = $('#searchResults').jqGrid('getGridParam', 'selrow'); if (gsr) { var data = $('#searchResults').jqGrid('getRowData',
Best Practice To Consolidate This Reusable Code?
Hello all. I have the following code that allow me to use the same functions if dropped within any one div. Click that div and it returns it coordinates, ht, and width. Instead of placing the same code block over and over. I would like to make it a simple function call but am not sure at which point to pass the "this" value. Please review the following. Thanks <script> //THIS FILLS IN THE TEXT FIELDS WITH THE PROPERTIES OF THE DIV CLICKED function rw_setTxtField(widthPassed,heightPassed, posLeftPassed,
download using jquery
I have this jquery $(document).ready(function(){ $("a.downloadHelp").live('click', function(e){ e.preventDefault(); window.location.href = '/artms/downloads/db-model.pdf'; }); }); and here the link <a style="padding-left:5px;padding-right:5px;" class="downloadHelp" href="#">Help</a> when user click on help link the file is opens in the browser , is there way to open the link using browser download window ?
Selector, droppable, and ajax
I need to say that I am not strong at Javascript nor jQuery. So my questions may be novice. I have something like followings: <div id="droppable"> <table> <thead> <tr> <th class="span-2">Column 1</th> <th class="span-1">Column 2</th> <th class="span-1">Column 3</th> </tr> </thead> <tbody> <tr> <td class="span-2">...</td> <td class="span-1">...</td> <td class="span-1">...</td> </tr> </tbody> </table> </div> and <script type="text/javascript">
jQuery ajax post works in IE ... fails in FF Chrome Safari
I am having a very strange issue with a jQuery script I am running on a Wordpress site. The basic script (excerpt) involves a form submission that is posted to a custom PHP script hosted on the same domain that eventually outputs a PDF file via e-mail. Below I have the jQuery scripts that power two different forms (after the first is completed, it loads the second). The problem is, the first form is currently only successful (submits to PHP script and generates e-mail) in Internet Explorer ( IE
two scripts conflict with one another when used together
I have two different scripts I am using on a web form, one which highlights the field when the mouse focuses on a field and another which checks the info and submits. They work fine separately, but together there is a conflict. Any ideas on how to resolve the conflict? Here are the two scripts. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script language="javascript"> // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np
$.getJSON works locally but not when uploaded to web server
I'm working on a script that is working fine on my local machine but when i upload it to my web server, my $.getJSON request isn't working. Here's an example: $(document).ready(function(){ $.getJSON('http://www2.bluestarjets.com/json/getcharterxresults.aspx? d=KSFO&a=KLAX',function(data){ //do stuff with the data }); });I've chopped out a lot of my internal code, which basically just takes the results and puts them into html elements. the url i'm requesting is on a remote server,
form success message - adding the time between login and submit
I am using JQuery to validate and display a success message once the submit is successfully completed. I want to also display the time it took between the time the user logs in and when they submit the form. I am using PHP sessions to determine when they login and a timestamp for when the information hits the database. I am not sure if this is more of a PHP deal or JQuery (probably a combination). Any ideas on how this can be done is greatly appreciated.
benefit of using $(function(){})?
Hello, What's the benefit of using <script type="text/javascript"> $(function() { foo(); } </script> instead of the more concise: <script type="text/javascript"> foo(); </script> Thanks
Verifying checked checkboxes
In an html site, I have several checkboxes named either "chidecb" or "coptions". <div id="info" style="width: 300px; height: 400px; float:left; margin: 5px;"> <input type="checkbox" name="chidecb"> <input type="checkbox" name="coptions" value="dit"> <input type="checkbox" name="coptions" value="kin"> <input type="checkbox" name="coptions" value="mus"> <input type="checkbox" name="chidecb"> <input type="checkbox" name="chidecb"> <input type="checkbox" name="coptions"
inArray() Help!
I need to pass a variable that represents another variable (in this case an array), is there any way of doing this? The first set of arrays (arr1 - arr6) are directly associated with the 6 links and will be created dynamically by the database to set which divs are related to which parent links. When the parent link is clicked I'd ideally like it to run through all of the divs (in .testcontet) and determine (based on their index) which ones are in the array. Does anyone know an easy solution? <script
Focus and blur
Hi there, Here's what I'm trying to do: When I click inside a text field, a div with id #formatting appears. The #formatting div contains... well, formatting options (like bold, italic, etc.) placed in <button> elements. When I click outside the text field the #formatting div has to disappear—unless the click is inside the #formatting div's <button> elements. $("#textarea").focus(function() { $('#formatting').slideDown(200); }); $("#textarea").blur(function() { $('#formatting').slideUp(200);
popup jsp page when mouse over anchor tag.
Hi, <a title="Supported Products for <%=mdb.getName()%>" id="supported" style="position: relative" rel="#supp-prod-000<%=j%>" href="#supp-prod-000<%=j%>">Supported <br /> Product</a> when mouse over it, list of values display on popup , those values in another jsp. How can i load jsp and popup it . Regards Mohan
Help with div resizing on selection on other div
<div id='result1' class='topdiv'> title1 <ul id="resultList1" style="float:left"></ul> </div> <div id='result2' class='topdiv'> title2 <ul id="resultList2" style=""></ul> </div> <div id='result3' class='topdiv'> title3 <ul id="resultList3" style=""></ul> </div> max heigth of the elements result1 and result2 130px. max elements showed in the lists(resultList1, etc...) is 8. if more make it scrollable. onload the first elements loads in resultList1 if one element in the resultList1 list is selected
$.post and rel="nofollow"
Hi all, I have a $.post method with an url I don't want google bot follow. So I must add the attribute rel='nofollow'. How I can do this with $.post ? Thanks
jQuery object
I have this snippet of code (below)... $('select').click(function() { var selected = this.id; var clickedVal = $(this).val(); var clickedCnt = $(selected+ 'option:selected').text(); ... which won't work as "var selected" cannot be inserted into the jQuery object like this. I'm trying to rationalise some code which works fine but is repetative and thus rather unsatsifying. Can anyone tell me how to 'insert' the variable value of "this.id" into the 4th line above so I can retrieve
jerky fading with scaled images in firefox and ie
I'm building a simple image gallery, and I was having problems with the cross-fade effect between images I'd created being jerky in Firefox and Internet Explorer (Chrome and Safari were fine). I thought my technique using jQuery's fade might be at fault, so I switched to the jQuery Cycle Lite plugin, but the same problems happened. I've just discovered the issue. I'm using JS to dynamically scale the images to fill the viewport - just by setting the width and height of the img. It seems that if I
line break xml ?
Hello, I got a Question: How do I make line breaks in my xml file? this is what I got in my <head>: <script type="text/javascript"> $(document).ready(function(){ $('.quotes').randomContent({xmlPath: "xml/quotes.xml", nodeName: "quote"}); }); </script> As you can see, it takes a random quote from my xml file. But I have some long quotes wich I want to line break like this: <quote> This is a verry verry verry verry <line break> ... long quote. </quote> I have been searching but I can't find
Adding multiple form elements
Is it possible to duplicate a few form elements on click of a button? For example if we have a form with the following fields: 1. Name 2. Address and we have a button that says add a member on clicking of which the same two fields above should be added: 1. Name 2. Address Hope someone can help! Norbert
Getting element position failes on select elements?
I'm trying to grab the X/Y co-ordinates of given elements on a page, and scroll to them using the window.scrollTo() method. This is working for standard text boxes (INPUT objects), but for drop down lists (SELECT objects), the JQuery .position() method isn't returning the result object: var el = $("#[id$=" + elements[i][1]); if(el.position() && el.position().top) { var top = el.position().top; var left = el.position().left; window.scrollTo(top, left); break; } This works just fine for text boxes,
Creating a Class / Object with JQuery
Hello I know this is really basic, but can someone point me in the right direction? I'd like to create a JS class/object where "this" is a reference in the object to its properties and methods. Something like this - only I haven't quite got it: var nameOfClass = ({ function nameOfClass(options) { //code here }, nameOfClass.prototype = { initialize: function(options) { //first method }, run: function() {
deception with jquery
Read second reply for deception... Hi. I have an animated jquery menu that works just great. I had it working with examples I've found all over google. My problem is I need to add a function outside of my menu triggered by an onmouse over so the one of my 3 menu slide down. See THIS PAGE for my working prototype. I added a test "trigger mouseover, but my goal is to have an image map to make this work. Anyone can point me into the right direction? Regards. Duke
submit() doesn't wait for ajax()
Hi there, I'm using the submit and ajax functions to check a form. When the form is submitted the submit event executes and within that event the data (a code the user has to fill in) is sent to the server to check if it's correct. If it is correct, the submit event supposes to return true (so the form submits), if it's incorrect the submit event supposes to return false (so submitting the form cancels). Here's my code that should do this: $(function() { var submit = false; $('#login').submit(function()
jQuery fade and redirect vs. normal link
I'm revamping my photo site and want to have nice fade transitions from page to page by fading out a couple divs, then doing a redirect and having that next page fade in the divs. this is what I used: function transitionLink (url) { $("#galleryDescription").fadeOut(600); $("#bottomContainer").fadeOut(600); $("#imageContainer").fadeOut(600,function(){ window.location = url; }); } you can see it here www.julianwalter.com/newsite if you click the top four
Input type-button losing ID after Slide effect + Ajax reply
Hello friends! This is my first post, sorry my poor english, isn't my native linguage. I have a little <form> with fews labels and input type text. In the end of this form, I have a input type button and the function: $("#bntSendUpgradeAdminProfile").click(function() { .... } Almost is running fine, almost.. The form is sent via Ajax to a PHP file, that makes all the hard work and reply the same form with wrong fields. The processe have slide effects to create a cool transition. The button $("#bntSendUpgradeAdminProfile")
Why jquery ajax not sending session cookie
I am getting logged out when I send request by ajax in a login session. I check headers sent by FireBug and saw there was no cookie sent during the request. But if I paste the request url in browser address bar and check Firebug again, I can see the cookie in headres sent to the server. Any solutions?
do not understand '[child]' in: $.each(response.d, createNode, [child]);
From the treeview.async plug in: $.each(response.d, createNode, [child]); where is the third prametern described? what does it mean?
Option opened by default in a vertical multilevel sliding menu
I am trying to work out a vertical multilevel sliding menu. I started using the UI accordion but I just discovered this code in an old post that works fine: $(function() { $('#accordion ul').hide(); $('#accordion li:has(ul)').children('a').click(function(event) { $(this).next().slideToggle(); $('ul',$(this).parent().siblings()).slideUp(); event.stopPropagation(); }); }); The HTML is: <ul id="accordion"> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a>
How to write test for this case using qunit
I have following code. $('a').live('click', function (e){ $('<form method="post" action="http://example.com/delete_me"></form>') .appendTo('body') .submit(); e.preventDefault(); }); When I write qunit test for above code, the form submits and then the url at the top changes from the test page to the url where form is submitted. It seems somehow I need to mock the form submission. What will be a good way to test the above given case?
Load contents from a form in an iframe
I have a form in an iframe, and the submit button is on the parent. How can i retrieve the values of the form (in the iframe) to pass it to another page? thanx
Help with onbeforeunload
Hi all, I am using onbeforeunload to warn before leaving/closing a page using:- window.onbeforeunload = confirmExit; $msg = "Warning you are about to leave!"; function confirmExit(){return $msg;} To stop links on the page showing the warning I am using:- $("a").live("click", function () { window.onbeforeunload = null; }); This works for almost every link execept there is java menu (ddaccordion) which has menu header page-links that appear to open with this code when clicked:-
help with login from not submitting
I have a form which uses JQuery and evaluates the data against info in a MySQL DB and allows or denys access. Works fine until I tried to add another PHP session variable, and then I just get the 'validating' message without any result. the part which causes it to break is $_SESSION['editor_name'] = $row['editor_name'] I thought it may be b/c I wasn't placing that in the JQuery, but I tried adding a hidden field to the form with the ID of editor_name and adding to the POST data such as this, but
Have anyone seen a jquery catagory shuffler?
That might not be the right name for it. But I was wondering if somebody have made Jquery function that could take a series of post, images or a collection of DIV's and shuffle them in different catagory orders.. like a "Chronological" button that shuffles the items into chronological order and a "Size" button that would shuffle them into a big to small order and a "color" button that would... well you get the idea? Is that a far fetched idea? TYI Pisosse
jQuery JSF Ajax Conflict
Hi, I've recently run into a problem with IE and jQuery Ajax requests. I've isolated it to a problem with JSF ajax code that's being included on the page (I can't not include the jsf it's out of my control). It's only a problem in IE and the error that gets passed to errorThrown is: Error: This method cannot be called until the open method has been called. The code works great if the JSF ajax file isn't there, and I've tried running jquery in noConflict mode but that doesn't work. I'm sure it has
Help Basic Ajax Jquery PROBLEM..
The Value of P2 is not transfered to php. <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <script> function b() { $.ajax({ type: "POST", url: "http://localhost/Untitled.php", data: "p2=10000000000", success: function() { alert( "Working!"); } }); } </script> <a href="#"onclick="b()">Test</a> <br> <br> <?php $pp1=100; $pp2=$_POST["p2"]; echo $pp1; echo $pp2; ?> </body> </html>
need help understanding part of code
I have some code which takes values of a form and submits to a database. In part of it, I am not sure what the rand.Math.random() is doing. I understand everything else. I received this code from a tutorial I found online and was curious. Here is the entire line of code. $.post("login.php", {username:$('#username').val(),password:$('#password').val(),editor_name:$('#editor_name').val(),rand:Math.random() } ,function(data)
[jQuery] Toggle Fade
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD> <BODY> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=812084116-17092009>I am trying to build a simple little effect when a user checks / un-checks a checkbox a specific div will fade in or out depending on the check state. I found lots of examples using toggle but I do not want to completely
Ajax .load problem
It seems i've used this simple function a million times, but for some reason today it just started not working correctly var class_id = $(this).attr('id'); $("#results").load('roster_query.asp', {class_requested: class_id}); It works fine in all browser except Firefox, where it requests the page, but it does not send the correct data. I did an alert on the data line and it reports the attribute coming back as expected (and like i said works in all browsers (Chrome, IE, Safari). Please Help.
Next Page