jquery

jQuery and PHP session issue

In uploadify I have a problem passing variable into the php script. Here's the code: $(document).ready(function() { var counter = 0; $("#uploadify").uploadify({ 'uploader' : 'scripts/uploadify.swf', 'script' : 'scripts/uploadify.php?upload', 'scriptData' : {'PHPSESSID' : '<? echo sessi...

problems in creating a flyout/sidebar menu

Hello all, I need some css and syntax help,please. Your help is warmly welcome. I want to insert a list containing some skypelinks and behaving like a sidebar menu when I move the mouse over the image. This is the html-code I tried to manipulate: <a href="?USER=name"> <img src="../../name.jpg?format=raw" title="full name - skypena...

Cross domain ajax fails even for a local file

I have a local html file with an ajax function trying to pull a xml content from x.com. The file when run works only on IE and fails on firefox and safari browsers. Ofcourse this may be because of the Same origin policy. But,I have heard from someone that for scripts loaded using file:// protocol,this same origin policy will not apply. I...

Can't get selectors to work with the JQuery SVG library

I'm having trouble getting an externally loaded SVG to do what I want it to with Keith Wood's SVG library. I can load an external SVG fine with: $(document).ready ( function () { $("#some_id").svg({ loadURL: 'my_file.svg', onLoad: my_function, settings: {} }); }); I can ...

How to re-register common javascript events in Rails after an Ajax request

Hello everyone, I'm writing a Rails app which includes ajax functionality using jQuery. I hope you guys could help me out here. For example, in my /public/javascripts/application.js : /* application.js */ ... $('.item-edit').editable('/item/update', { name : $(this).attr('name'), id : $(this).attr('id'), cancel : 'Can...

ListView equivalent using jQuery

I am transitioning a WPF application to the Web using ASP.Net MVC and jQuery. In my WPF application I have a ListView containing thumbnails and captions that looks like this: I need to display something similar in my web-based application. Requirements: User must be able to select items in the list (multiple selection would be usef...

Get elements in jQuery where "x" attribute = "y"

How can I change the attribute of an element, depending on another attribute? For example, I have 2 <a> elements. They both have the class myClass. One of the elements has rel="1" and the other has rel="2". I wish to only change the z-index on the one which has rel=1. How do I do this? I've tried: $(".myClass[rel='1']").css("z-index",...

Jquery dialog to open multiple windows

I'm trying to make system of multiple dialogs in one page using jquery dialog... Functions looks like... function open_w(id){ $('.opened').dialog('close'); $(id).addClass('opened'); $(id).dialog({position: 'center', modal:true, width: '750px' }); }; function close_w(){ $('.opened')...

jQuery delay() not working

Hi, I have a div with an id of dropdown. I want it to drop down for 5 seconds then go back up again but I can't get the delay to work properly. It comes down but doesn't go back up again. Here is what I have: $('#dropdown').slideDown().delay(5000).('#dropdown').slideUp() Any help much appreciated thanks ...

jqGrid drag and drop column reorder

I've seen example of jqGrid does drag & drop column reordering http://www.trirand.net/examples/functionality/column_reorder_resize/default.aspx. However, the feature is not documented anywhere in the jqGrid Wiki, or maybe I overlooked or something. Does anyone knows how to implement this in jqGrid? Thanks. ...

jQuery: Basics - Variable Scope Issue

I've hunted around for about an hour or so trying to glean whatever I could about variable scope in jscript/jquery and by all accounts, my code should work. Right now I just want to be able to read a global variable from a function. My code isn't working and right now it's very basic. Eventually I will need to manipulate the global va...

jQuery dynamically generated textbox not behaving correctly

I have table columns with values in them and when you click the edit button, I am creating a textbox with the column value in it, kind of like an edit-in-place feature. var title = item.find('.co_edit_title').html("<input type='text' style='width:240px' name='title' value='" + item.find('.co_edit_title').text() + "' />"); Works fine, ...

jQuery how to get body contents out of html reponse

Hi, I have a bit of a problem. I have an ajax request that is sent out to do a database update. A response is then returned that looks like: ... ... </head> <body class="contentpane"> {"id":"27","votes":14,"sum":45,"avg":"3.2"} </body> </html> How can I get the contents of body class "contentpane" and then convert this to a JSON obje...

How to use JS to trigger a GIF animation?

I have an animated GIF that plays once (doesn't loop). I would like it to animate when clicked. I tried something like this: $('#plus').click(function(){ $('#plus').attr('src',''); $('#plus').attr('src','img/plus.gif') }); With the hope that quickly resetting the src would trigger the animation, but no luck. Anyone know ...

jQuery validation - limit input to 3 specific lengths

Hi, I'm using jQuery as the validation tool for all of my forms and I have a request to limit the length of the inputs on one field to 8, 12, or 13 characters only. Now, I'm already doing minlength: 8, and maxlength: 13 to take care of the upper and lower limits but haven't figured out how to limit the entry to exactly one of the three ...

how to dynamically create elements in a child window from a parent window

im trying to dynamically create elements in the child window based on the values i have in the the parent window but no success.The child window is opening but not with the elements.Here is the code i've written,could some one please have a loot at it ? is this possible at all using javascript/jquery> function fnOpenPrint(){ openPrint...

Javascript exit full screen swf

Trying to exit fullscreen of a swf using javascript. Managed to do so by hiding the showing the player. With jQuery, like this... $('.player').hide(); $('.player').show(); Was wondering if there was a better way to do this? Thanks Edit: also I'm using swfobject if that helps in anyway. ...

function exists but fire bug says not defined

Hi All , I have a div on click , and function very well exisits in the file. I verified through firebug also , but still it says. showPopUP is not defined It was all working good , suddenly it stopped working. any clues how to debug this issue. We did a file aggregation and all tha javascripts at the runtime are aggregated in one f...

How to add &ref=123 every link

How would i be able to put the follow on the end of every link of my website with out editing every link? e.g www.WebsiteName.com/?ref=123 so if i went to www.WebsiteName.com/aboutus.php i want it to add ?ref=123 onto the end of the url. ...

Use JQuery UI styles on other HTML elements

We use a JQuery UI theme and also have a <fieldset> with this CSS: fieldset {border:1px grey solid}. Instead of specifying grey for the border, how can we use a color/style that is provided with theme? ...