javascript

Get current url including parameters of Jqgrid

I am looking to get the full url of the last request to my ajax service made by JqGridincluding page, records per page, search params etc. Is there any method or collection of methods within the JqGrid api I can use to achieve this? ...

jQuery – Adding a class at/after a specific point in scroll, with variable-length content above

Hi all, Fairly new to jQuery and JavaScript in general. I mocked up an example of my problem at http://jsbin.com/alibi3/2/ - with an explanation below. I have a div that, after a user scrolls past a certain point on the page, is assigned a class of "fixed" so it follows the user down the page. This works fine on its own. Problem is, t...

Binding multiple events of the same type?

Firstly, is it possible? Been struggling with this one for hours; I think the reason my events aren't firing is because one event is unbinding/overwriting the other. I want to bind two change events to the same element. How can I do that? As per request, here's the function I'm struggling with: (function($) { $.fn.cascade = funct...

Convert String to Array with Javasript?

I've got some Data being returned by an API that is formatted in a string, I want to convert it to an array so I can pick values out of it. Comes in like the following: images/20100819_202433.jpg{ "permalink": "http://burstn.com/sayhi#burst/06d67eed55d05dd545583de5b4ca3556", "total_comments": "0", "caption": "", "created_at": "2010-...

JQuery Validation Plugin: How do I get it to revalidate.

The site: http://tinyurl.com/358lh6a I want to revalidate the palace address (domain they are wanting, form is: Name) whenever the DomainSelect (the domain extention) is changed in anyway. I tried just a simple: <select id=DomainSelect name=DomainSelect onChange="$('#Register').validate().element('#Name');"> It didn't work though. I...

My AJAX tabs callback function is getting huge... Need some guidance.

I'm using jQuery UI tabs to display a few pages of a pretty big form my users have to fill out. The form is, unfortunately, Web 2.0. It has the 'Add more' buttons to add extra inputs to the array, there's one tab that utilizes jQuery UI's draggable() functionality as a kind of 'add more alternative'. Basically, there's a lot of Javascri...

why can't the datacontext detect changes to controls binded to a dataview when these changes are done via js?

I created a javascript AdoNetDataContext and created a DataView from it. I was using textboxes on the template for the table columns. AdoNetDataContext can track changes if there were any on the textboxes corresponding to the table columns used. But my changes to the textbox are done via jquery. The thing is, datacontext does not recogni...

Get pixel color of Base64 PNG using javascript?

I have a base64 encoded PNG. I need to get the color of a pixel using javascript. I assume I'll have to convert it back to a normal PNG. Can anyone point me in the right direction? ...

How do you get the previous url in Javascript?

Is there any way to get the previous url in javascript? Something like this: alert("previous url is: " + window.history.previous.href); Is there something like that? Or should I just store it in a cookie? I only need to know so I can do transitions from the previous url to the current url without anchors and all that. ...

HTML <input type='file'> File Selection Event

let say with this code <form action='' method='POST' enctype='multipart/form-data'> <input type='file' name='userFile'><br> <input type='submit' name='upload_btn' value='upload'> </form> with this we get now when we click the 'Browse...' button, a file search dialog box is opened now the user will select the file by double-clic...

how to display moving elapsed time in jQuery?

Hi, let's say im returning a datetime string like this in JS: "8/18/2010 9:35:27 AM" I would like to have a function that displays an elapsed time based on the current date-time in this format: "x days x mins and x secs" is there a faster way to do this in jQuery? thanks! ...

loading flash preloader before the game content loads

hi there, as i am new to javascript with flash. i have a small requirement. like i am currently working on a games website in which whenever i open the game a flash preloader needs to open first and hide the game file while the flash preloader loads. once the flash preloader completes its loading then immediately the game content need t...

How to multiply text box values with javascript

I would like to multiply the values from two text boxes (txtBox1 should contain an Integer value, txtBox2 should contain a Float value) and place the result in a third text box. My code is below, but it doesn't work. The javascript function is called, otherwise it fails. Can someone please help me to code this correctly :\ ? Thank you ...

$(document).ready(function() VS $(function(){

Possible Duplicate: what is difference of $(function(){ }); and $(document).ready(function() { }) ;? what are the differences between $(document).ready(function() vs $(function(){ and should I write it in the $ form or the new jQuery(document).ready(function(){ way? if I have google api loaded is google.setOnLoadCallback(fun...

Why Some Sites not opening in Pop Window?

I have an html page. On that page I want to open popup window. I have a link on which I have to click & open new pop up. But, it is not a new browser window. It is AJAX based popup. I do have used Queness popup & YUI dialog popup. Now, in that window I want to show an iframe which will display page related to link I have clicked. But, ...

How to set frameset col value to a variable

This piece of code produces a page with two vertical columns: <frameset id="set" cols="*,*"> <frame id="frame1" src="index.html"> <frame id="frame2" src="index2.html"> </frameset> However, I want to be able to set the cols value independantly like this: function setvalue(){ var framewidth=prompt("Enter the default ...

Retrieving controller value in JavaScript

i have a temp data which i want to receive in javascript and then want to assign it to the tab selected? how would i do that? var langid ="<% Tempdata["something"] %>"; $('#tabs').tabs('select', 'tabs' - langid); ...

onexit - request an url

Hi! I've some problem with requesting an URL when finishing (exit) the widget. I try to use it via window.widget.onexit on request then an logout URL which makes some logs in the backend. I tried it by the following ways: window.widget.onexit = function() { xhr = new XMLHttpRequest; xhr.open("GET", "http://new-ken.de/alwaysOn/php/lo...

how to send form data through javascript?

HTML code- <form> .... <a class="art-button" href="edit.php" >Edit</a> <a class="art-button" href="#" onclick="show_confirm()">Delete</a> </form> JavaScript- <script type="text/javascript"> function show_confirm() { var r=confirm("Do you want to delete?"); if (r==true) { // call "delete.php?id=value" } e...

how to display menu on mouseover in symfony or php?

Hi, I want to display menu when cursor is on 'Home' option in symfony. I have created submenu using json but i am not able to display that menu. Please help me on this. Thanks in advance. ...