jquery

ThickBox with googlemaps

Hi, I was wondering if its possible to use the Google maps IFRAME code to show up in a thickbox jQuery lightbox. Any help I am trying to use the embeded url but no luck. has anybody seen a solution to this problem I have tried googling but to no avail. ...

JQuery Copy text & paste into textarea

I've created a javascript function that will take a hidden span, copy the text within that span and insert it into a single textarea tag on a website. I've written a function in JavaScript that does this (well, kinda, only after a few clicks), but I know there's a better way - any thoughts? The behavior is similar to a Retweet for twitte...

JQGrid subgrid Url: Is it possible to change the value of ?Id=id

Hi folks, I'm trying to implement a JqGrid with a subgrid as so... jQuery(document).ready(function() { jQuery("#list").jqGrid({ url: '/OrganizationalUnit/FindAll/', datatype: 'json', mtype: 'GET', colNames: ['Name', 'Actions'], ...

Is it possible to write a second non-static, selecting, priviledged function in a JQuery Plugin?

Almost all of the examples in the jQuery tutorials that I've read, usually use one major public function for their selecting plugin. When I say 'selecting' plugin, I mean one that is not simply a static function extended onto jQuery. For example: (function($) { jQuery.fn.actionList = function(options) { var opts = $.extend({}, $....

how to print part of rendered html page in javascript?

javascript code window.print() can print the current html page. My question is: if I have a div in an html page(for example, a page rendered from ASP.NET MVC view), then I want to print the div only. Is there any JQuery Unobtrusive javascrpt or normal javascript to implement this request? Make it more clear. Suppose the rendered html...

[jQuery] Execute script based on which option is selected in a select box?

I've got a select box where the user selects which elements they want to see based on option 1, option 2 and option 3. So what I'm trying to set up is have if option 1 is selected run one set of commands and if option 2 run another and so on. I guess I just need to know how to set up the jQuery selector. ...

[jQuery] Modify the show/hide function to only scale width, not height?

As the title implies, I'm using jQuery's show and hide functions to hide and show elements. However, I don't want to scale in the height of the element, just the width. I was thinking about using the animate function but I wasn't sure if this was the best way to go about it. Also, I'd prefer not to have to set the height in the javascr...

detecting change in a text input box using jquery/javascript

in html and javascript, I can use keyup, focus, blur to detect most of the content changes in a text input, however if the user do a copy and paste into the text input, how do I capture this change? The issue here is that the input is already in focus when user paste into it. ...

Is it possible to style a select box?

I've got an HTML select box that I need to style. I'd prefer to use just CSS but if I have to I'll use jQuery to fill in the gaps. Can anyone recommend a good tutorial or plugin? I know, Google, but I've been searching for the last two hours and I'm not finding anything that meets my needs. It needs to be: Compatible with jQuery 1.3...

Regex to change spaces in images into entities

I'm having a lot of difficulty matching an image url with spaces. I need to make this http://site.com/site.com/files/images/img 2 (5).jpg into a div like this: .replace(/(http:\/\/([^\s]+\.(jpg|png|gif)))/ig, "<div style=\"background: url($1)\"></div>") Here's the thread about that: http://stackoverflow.com/questions/1066697/rege...

Error occurs when jQuery processing a form is inside another form

I am writing a form using jQuery and encounter some difficulties. My form works fine in static page (html). However, when I use the form in dynamic page(aspx), the form does not behave correctly. I cannot append items to the form and call the form.serialize function. I think the error occurs when a form is inside another form (.aspx co...

How to pass href value to below href

Hi, I have below html code in my aspx. <input type="hidden" id="medicalLink" value='<a href="/forms/contactus.aspx" >Contact Us</a>' /> I want to pass complete href value of above input type to my below code when page gets rendered. <div class="label" id="lblMedicalLink"> Medical and Travel insurance?: ...

Browser compatability in jquery

I have created a small webpage, where I would like to animate content using jQuery during navigation. Its working perfectly in IE. If I use Firefox it's not working properly. My code is as follows $("#maincontent").animate({"top":"450px"},800, function(){ $("#maincontent").html($("#"+Lidentity).html()) .animate({"top":"-10px"},6...

How to preload the html in a javascript var.

I have a website that I'm working on. I'm using jquery to animate and display content. This content is stored in vars. I need to know how to load the content before displaying it. For clarification, you click a link, a "loading..." window fades in, and once it loads everything, it fades out and fades in the loaded content that is stored...

Dynamically referencing Javascript Array name without using Eval?

Given that EVAL is Evil how do I create an Array name dynamically: I have a bunch of Arrays and I need to reference different ones depending on what the user clicks. This bit of code gives me the array object: (eval(calendarObject.id + '7')) But eval is bad, so how to do I construct an Array name and then reference it? Here's a bi...

JavaScript validation issue with international characters

We use the excellent validator plugin for jQuery here on Stack Overflow to do client-side validation of input before it is submitted to the server. It generally works well, however, this one has us scratching our heads. The following validator method is used on the ask/answer form for the user name field (note that you must be logged o...

jQuery Plugin Check Version

When writing a new jQuery plugin is there a straightforward way of checking that the current version of jQuery is above a certain number? Displaying a warning or logging an error otherwise. It would be nice to do something like: jQuery.version >= 1.2.6 in some form or another. ...

Identifying dyamically generated content on a page

What is the best-practise way of Identifying dynamically generated element on page? Let me explain. I have a list of elements, there can be as few or as many elements as the user defines, on a page. Each one of these corresponds to an item each with it's own id. Now, the user has the ability to edit or delete these elements on the page...

jQuery javascript array handling

Noobie muddling his way through an Ajax autosuggest form: I've got most of it working, but need to break things down a bit, so I can understand how jQuery refers to things. EDIT: This is my working code, thanks guys. Some problems with delay on the ajaxdiv, not hanging around, but I am working on that ;) function jQajax(ipfield,ajd,dbt...

Performing validations for the form in Cakephp

hi, I am using Jquery and cakephp for my application . I am having a form created in my page using $form->create of cakephp .THe form contains many fields which the user will fill it on and on submitting ,the data is saved by function submit($id = null) { foreach ($_POST as $key => $value): $this->data['Result']['form_...