javascript

JavaScript: Calculating a value from a CSS property in a <DIV> to another <DIV>

I'm a noob so this is probably basic stuff, but I have tried to solve this by searching the web without any luck. Any help is much appreciated! What I need to do is: To move a floating down X px after the page has been rendered, where X is the height of another . I have tested the CSS manually, adding X px to the "Top:" property and it...

JavaScript to Manipulate Copied Text

I copied come text from a The Huffington Post article and found that the web site had somehow snuck a citation onto my clipboard: The text I had selected. Blah. Blah. Blah. Read more at: http://www.huffingtonpost.com/... How did they do that? ...

PHP AJAX mysql event calendar - UI for events spanning multiple days

I have built a PHP calendar system and have pretty much everything done but not sure how to deal with a UI issue involving how the events that stretched out over a couple of days. I want to be able to stretch an event that stretches over couple of days in a div that spans those days in the calendar. Basically I would like to know how to ...

JavaScript set scrollHeight

Hi, In JavaScript what's the right way to set the scrollHeight of one element to that of another element? Direct assignment has no effect. Thanks, Greg ...

Can GWT be made accessible for users with JavaScript disabled?

My question concerns Google Web Toolkit (GWT). I'm about to begin development for a project that will reside on an Intranet where some users may have JavaScript disabled. After seeing what GWT has done for Google Wave I've been very interested in learning and applying it to this new project, but if it isn't accessible to those users then...

Binding multiple handlers to elements

Hey, I'm new to JavaScript so this is most probably going to sound really basic but here goes. My web page is made up of "modules" which I load into the page with jQuery, so that my JavaScript works with the new content that has been loaded into the page, I have been told to use callback functions. My problem is though, how do I activa...

TinyMCE textarea problem

I have an automatically generated text-area (by the Erlang Web framework) that looks like the following: <span class="form_input"> <textarea id="question_text" class="tinymce" name="question_text"> </textarea> </span> I'm trying to apply the TinyMCE editor to it, but what happens is the following: http://img24.imageshack.us/img24/9...

Javascript style.opacity undefined

I use Javascript and Mootools for creating a particular HTML page, which includes a javascript file that checks the opacity of an element for a certain operation. However, on IE, I face this issue of elem.style.opacity giving out a undefined value. Here is the operation I am doing, var elem = $('login'); alert(elem.style.opacity); i...

How to load a joomla module in jquery dropdown panel

Hi, I want to load my top-menu in a dropdown panel. I used this "jquery dropdown plugin" and it just works great for a html static content. But I'm going to load a joomla position in this panel so it may show a module in the dropdown panel. How can I do this? Note : please see the plugin page before any new suggestion. Best regards an...

Easing With JQuery

Can't seem to get the easing function to work with my parallax. Trying to make the board move a little cleaner. Any help would be greatly appreciated. Sorry I'm new here and whenever I try to post my code it tells me I cannot have an image. I put it up on my host. http://cheapramen.com/JQuery/skate/moveit.html ...

jQuery form submit: add element, then $.post problems

On form submit I want to serialize the form's elements, then stick another field on, then submit with $.post. Can't quite get it. The form's submit action looks like: data = $(this).serializeArray(); data.push({filter: $.toJSON(filter)}); $.post("/datawarehouse/new.php", data); return false; But it's just the form's fields and then u...

Fancy Box doesnt work please help

I recently came across fancy box located here, I've followed every step in the instructions perfectly, but it doesn't work, anyone know what might be the problem? Here is a sample of my page source: Included the links to scripts as required, and CSS: <script src="jquery.fancybox-1.2.1/jquery.fancybox/jquery-1.3.2.min.js" type="text/ja...

Acessing javascript multidimensional array with linear values

How could I set a variable that I can read by using eval('productOptionTree' + '[0][1][0]')? (the '[0][1][0]' part comes from another variable) UPDATE it's an ugly question, but I couldn't find another way to do it. the only answer I could find is: newVal = 4; dim = '[0][1][0]'; eval('productOptionTree'+dim+' = ' +newV...

CSS Selectors in Javascript with all H tags

Using Prototype JS library, I want to select all child link elements (A tags) regardless of whether their parent is: H1, H2, H3, H4, or H5 (etc) with a simple CSS Selector Rule (as opposed to further JS, like looping etc). So the simple, but long way, to do this is: $('page').select('h1 > a, h2 > a, h3 > a, h4 > a, h5 > a') I guess I...

Lotus-Notes: Reset Radiogroup via Javascript

I'm currently working on a Lotus Notes solution. We're just using Web forms so client side operations are done via Javascript. What I want to accomplish is to reset a Group of Radio Buttons. There are 3 possibilities and I want to choose none. (A 'none of them' possibility would be preferable, I know but we are required to reset them) ...

Scrolling an HTML page with javascript?

I created a page that scrolled via JavaScript but in some browsers it does not scroll very smoothly when you and text to the page? And it doesn't seem to work at all in chrome. My question is: What is the best method to create smooth scrolling html pages using JavaScript that works cross browser. To get an idea of what I was trying ...

Can I post form asynchronously to secure (https) url?

I've got a form on html page and some javascript code that posts it using AJAX via jQuery. When I run function that performs POST operation it doesn't appear to take any effect, but synchronous POST does work (I test it via submit button). Can problem be related to the fact that action url of the form looks like https://************** ? ...

Javascript - JQuery - OnHover NOT OnClick - Modifying a plugin

If you look at the right, there is a thumbnail gallery. I need to change the action from 'on click' to 'on hover'. I'm not a javascript developer and changing scripts at this point will be futile (too many hours modifying this one...for other reasons). If you could help me find a way to change the action from 'on click' to 'on hover', I...

Regex for replacing a single-quote with two single-quotes

I'm running into an issue that I think is being caused by needing to double-up on some single quotes inside a string. However, JS's string.replace uses RegEx, and I've never built a RegEx by hand. Can someone help me build a RegEx to find a single quote and replace it with two single quotes? ...

changing links in an external function with Jquery

I have some links on a site which I need to direct to a page telling the user that they are leaving the site. All of these links already have an onClick function on them which normall triggers an alert telling them that they are leaving the site. For example, this would normally trigger the alert: <a href="http://www.example.com" oncl...