javascript

Menu glitchy on top of slideshow

I have implemented the following set up (after being requested): slideshow of images changing, after the user mouse over, the menu would appear in the top right corner, it would disappear on mouse out. The problem is that the menu is glitchy when I try to mouseover its items, it happens in both IE6/7 and FF 3.5. I have tried Jquery hov...

JQuery add hidden element to form programmatically

Hi Guys This is really getting to me now.I have a form that loads when the page loads.In my jquery 'ready' function I append a hidden to that form like so : $("<input id='thehidden' type='hidden' name='thehidden' value='hiddenval'>").appendTo("#MenuForm") When I check the form content with firebug i can see the element is added. ["...

Clear default values using onsubmit

I need to clear the default values from input fields using js, but all of my attempts so far have failed to target and clear the fields. I was hoping to use onSubmit to excute a function to clear all default values (if the user has not changed them) before the form is submitted. <form method='get' class='custom_search widget custom_sear...

ASP Button Calling JavaScript Function

I am attempting to construct my own date picker using code from several sources. Specifically, I am now attempting to have an asp:button display/hide the calendar. What am I doing wrong? myDate.ascx <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="myDate.ascx.vb" Inherits="Website.myDate" %> <script language="javasc...

jQuery Accordion Plugin: removeClass('selected')

I am using the Accordion menu to filter a data table. The menu contains two filters, with multiple options under each. You can only have ONE filter selected at a time. If you click between the two options under the first filter, the style class, 'selected' is added and removed without a problem. If you click an option under the secon...

Prototype callback functions swallowing exceptions

Hi all Using Prototype version 1.6.0.2. I have a common problem where exceptions are being swallowed when they are thrown in a callback function, typically when I am trying to handle the response to an Ajax.Request call. Here is a simple example: HTML markup: <input type="button" id="myButton" value="Press Me" /> Javascript: MYSI...

JqueryTools conflict

I am trying to create this tooltip sample for my wordpress it works just fine but as soon as I integrated it in wordpress I can't get the tooltip to show up. The page where I want to work is here ok I did a little experiment this is test versionand this is the wordpress version. The test version is the code when you do a view source a s...

How can a Script be passed through a TextArea into a Form?

I need to make a form with a Text Area that accepts lines of script, any kind of script be it javascript, css, html, vbscript, whatever. How can the script be passed to a form post? EDIT: How can this script be modified so it can be inserted into a Database? Specifically SQL Server 2005 ...

Is it possible to hide or manipulate the jqGrid "sort" icons?

I have a custom, multi-column sort attached to my jqGrid instance by means of the onSortCol event: onSortCol: function(index, iCol, sortorder) { //Manipulate the sort order via custom code, and store it in postData. return 'stop'; } The problem I'm running into is that the sort icons in the column headers are falling out of s...

Counting string length in javascript and Ruby on Rails

I've got a text area on a web site that should be limited in length. I'm allowing users to enter 255 characters, and am enforcing that limit with a Rails validation: validates_length_of :body, :maximum => 255 At the same time, I added a javascript char counter like you see on Twitter, to give feedback to the user on how many characte...

Javascript problems?

I've been staring at the source code of these two download pages for awhile now and i can't seem to find the problem. I have two download pages, one where the javascript is working, one where it isnt. working: http://justupload.it/v/lfd7 not: http://justupload.it/v/ljhv The working one allows me to rotate the image and reveal the comm...

Changing classes on multiple divs when selecting specific radio buttons

Hey everyone I got a javascript problem I can't seem to find a specific solution for on the web. What I want to be able to do is select one of the radio buttons and have that change the class of #home-right to either .rackmount or .shipping and add the class of .displaynone to the type of dimensions I don't want shown. <div id="home-rig...

Focus on textbox based on URL.

I have two forms on one page and want to have the input boxes focused based on the URL. So for example: domain.com/Default.aspx#login and domain.com/Default.aspx#register and the javascript I have this: if (window.location.href = '?action=login') { window.document.getElementById('<%=txtUserName.ClientID %>'...

retrieveing info from python dict with javascript.

Hi I have such stuff in my django view: message = 'sometext' rating = 7 data = {'message':message, 'rating':rating} from django.utils import simplejson return HttpResponse(simplejson.dumps(data)) and this in my site.js: $.ajax({ 'type': "POST", 'url': url, 'data': {'rating':rating}, 'success': function(msg){ alert(msg['rating'...

Change Browser settings by script

Hi Folks, Afaik, you can change/manipulate browser settings in Mozilla/Netscape browsers. For Instance "netscape.security.PrivilegeManager.enablePrivilege('someprivilege');" Of course the user gets informed about that and needs to verify the action. My question is, do other browser have similar functionality? IE, Safari/Chrome ? Kind...

How can I load static configuration information

In my code, I use JavaScript for UI and PHP for back end. I also use PHP to store application settings and sometimes my UI code needs to access this information. My configuration file looks something like this (config.php): $resolution_x = 1920; $resolution_y = 1080; etc... When I need to access any of these settings form JavaScript, ...

Javascript/JQuery: return immediately from PARENT function in call to each() via anon function

For example: > function foo() { > jQuery(whatever).each( function() { return; // this just exits the anonymous function - is there a way to return from foo? } ); > > } ...

Include OpenX ad in a jquery-ui dialog?

I'm loading some content into a jquery-ui dialog via .ajax. That's all working fine but now I've been given an OpenX ad to embed into the dialog & can't figure out how to do it. I know all the script is stripped when coming in via ajax, & I know how to use $.getScript to load .js files for use in the dialog, but the OpenX ad script I'v...

Script Debugging in IE

Hi Folks, I'm really interested which way you guys use to effectivly debug a large (let's say 1000 lines and more) javascript in IE7/8/9. I'm so sick of reading a message like 'error in line 9328789237498" or "line 1" which totally makes no sense. No error description. There must be something like Firebug? please? :) Kind Regards --...

How can you assign multiple Javascript functions to the upload_start_handler for WordPress's SWFUploader instance?

I've got 2 WordPress plugins (PhotoSmash and TwitPic-It) that need to hook into the SWFUploader for the Media Uploader in WordPress. SWFUpload has a setting "upload_start_handler" where you can specify a javascript function that will run immediately before the upload begins. The trouble is that I need to assign 2 different functions to...