javascript

js popup window to play .flv flash video using jwplayer.swf

I have to have many small thumbnails on a page and each one needs to open up to a full size (640x480) video with controls when clicked. ...

Firefox -- Dynamically embedding <svg> element in SVG

I am trying dynamically to append an <svg> element to an existing SVG island on an XHTML page (Firefox 3.6.3). And it is crashing the browser. Done manually, this works as expected: <svg xmlns="http://www.w3.org/2000/svg"&gt; <svg xmlns="http://www.w3.org/2000/svg"&gt; ... </svg> </svg> However, if you dynami...

What's the topmost iframe in the same domain?

How can I get the topmost iframe which is in the same domain, i.e. iframe level 1 example.org iframe level 2 example.org iframe level 2 example.org iframe level 3 example.org <-- should return iframe level 1 iframe level 1 other-example.org iframe level 2 example.org iframe level 2 example.org iframe l...

POST data disapearing on large file upload

I'm having issues with a file uploading utility in my PHP application. When sending large files (9MB+) over the form, I get a very odd behaviour: the POST data I've included in the form dissapears, including the file information. I've already increased all PHP limits I could (time limit, max input time, post max size, memory limit and u...

Pass method to function

Hi, In Javascript I'm trying to pass a class member to a jQuery function, but somehow the 'this' object in that function gets messed up. This is the code: function Hints() { this.markProduct = function() { alert('hi'); }; this.selectProduct = function() { this.markProduct(); }; } When I call this code using this: o...

Make a div content (googlemap) fullscreen

Hi iam trying to make a button that will turn the googlemap div into fullscreen.. this is what i have untill now, but it is not working correctly .. problem is: the map will only half loaded the code is below, and a screenshot how can i repair this? where is the problem? thanks in advance http://img32.imageshack.us/img32/9365/halfload...

Delete text in text box using PHP

Hello, is there a way to remove text from a text box using a submit button? I don't want to delete text from all boxes on the form. And I don't want to delete text 'onclick', for the element. I need the code to clear the text box, to initiate from within a block. For example <input name="text" value="submit" /> <input type="sumbi...

How do I "step over" jQuery code while debugging?

While stepping through a script that uses jQuery, I just want to test the code I wrote. I don't want to step into the jQuery file -- I'm not debugging jQuery, just my own file. Are there any ways to tell a debugger to not step into the jQuery file? I use Visual Studio + Internet Explorer, as well as Firefox + Firebug for stepping thro...

Does jTemplates foreach preserve the ordering of the collection?

My collection is ordered alphabetically, but when I assign the collection and load the html using jquery jtemplates, things are coming out un-ordered. {#foreach $T.results as r} <li>{$T.r.Name}</li> {#/for} Is this expected behavior? ...

How to fire an event on error in jquery validator plugin

I have jquery validator running and I the page is so long, so I want the page to scroll up to the top because I display errors on the very top of the page above the form, doesn anyone know where I can put the code for the animation so it fires when the form has errors ? ...

Which Java Web Framework allows Cross-Domain Javascripting (http proxy) ?

So just a quick intro, I am starting to explore Vaadin, and it's absolutely perfect. Previously, I was juggling PHP, Perl, Ruby, and Jquery for designing rich client web application. It didn't work out too well, as I've burnt out from trying to fix cross browser issues (aka get-it-to-work-on-IE-damn-it), handling server-side, client-side...

Javascript table not working correctly.

I´m trying to figure out why that table is showing like that, I mean, how to set every col to ocuppy the full width of the table frame? here´s the function that creates the table: function rp_insertTable() { FM_log(3,"rp_insertTable() called"); var farmTable = dom.cn("table"); var ftableBody = dom.cn("tbody"); var...

javascript call a privileged method

If I call the killSwitch() outside the onkeypress, I'll cause an error. But inside the onkeypress function, I worked just fine. Why? // this works fine var ClassA = function() { var doc = document; // killSwitch(); doc.onkeypress = function(e){ killSwitch(); } this.killSwitch = function(){ alert('hello world'); } ...

Multiple Queues in jQuery

I am having problems using multiple queues in jQuery. Consider the following example: $('#example').click(function() { $(this).delay(1000, 'fx2').queue('fx2', function() { alert('here'); }); }); The alert never fires. Why? ...

javascript addEventListener onStateChange not working in IE

Hi, I have two colorbox popup boxes which show a youtube video in each. When they're finished playing, I'm trying to have them automatically close the colorbox window. This code below works perfect in firefox, but in IE I can't get addEventListener to work. I've tried attachEvent with no success. Can anybody offer any suggestions as to h...

How to move iframe along the DOM without losing it's content?

Is it possible? I have tried to move it, but iframe contents dissapear. Tried to get contents of iframe and place them in the new place but all handlers ofc dissapear. Tried to do the same, but with new jQuery 1.4.2 feature, that clones all events along with it. But it doesn't work :) So I have decided to ask here for help. How to ...

Adding a Click event to a submit button and then submitting the form

Hello all, I have a form with a submit button. I have attached a click event to that submit button using JQuery. Once I did this my form wasn't submitting, I thought this was because of the event I added- if I remove that click event it submits the form successfully. I have tried giving my form an id and calling the submit function but...

Where do you hang your semantic information, html?

Well, I keep putting semantic information about what an element means for the page logically in the class attribute <li class="phone-number">555-5555</li> It seems to work for this dual purpose of hanging semantic information and a pointer to how to style it. I'm not sure if this is the best idea, I'm trying to see if others have oth...

jQuery's getScript and the local file system-- limitations/alternatives?

Right now I'm working on a help-system which is based on a local file system. It is intended to be shipped with a product which is not used on internet-enabled machines, so it must be a stand alone webpage, without any dependencies on a web server. This introduces a few challenges. Namely, the directory structure that the files exist ...

Anchor without href

What is the best crossbrowser way to make anchor without href (javascript-driven) behave like real anchor? The most obvious one is to use # as anchor but it makes page jump... ...