We are using FlowPlayer to display a video on our website page here. However the video appears very small in IE8 (like a thumbnail) and I cannot seem to work it out!
I want to resize the dialog/popup box that appears as datepicker. How can I make the size smaller than what it comes as default size? I have to navigate on the dates using arrow keys. How it is possible to implement.
im trying to make a small jquery bbeditor and have hit a road block. when the user selects the [b] tag for example i want it to wrap the tags [b][/b] around their highlighted text. if they havent highlighted any text then it will insert the tags as normal but i need the caret to be in the middle of the tags. Any one know how i would go about this?
Here's a small collection of bookmarklets for disecting your own (or other people's!) websites. They do things like, show all TABLE elements with a red border, hide non-link images, and so on...
To edit or modify a bookmarklet code, it must be in the form of a multi line code in a html file or a js file.
But to test or run the bookmarklet, I need to do three things:
1. go to online bookmarklet builder site 2. paste my (multi-line) code there and generate bookmarklet link 3. drag it to toolbar
And I need to go thru these tedious three steps several times because developing a long bookmarklet (like MyPage) is not like: write code -test it -done. but it's like:
write code -test it -it doesn't work. -modify code(put debugging code) -test it -it still not work -modify code -... How do you get around with this tediousness? Is there a way to skip the three steps?
a common task when writing multi-use functions, is deciphering the type of data passed to the function.
Javascript's built-in data identification methods complicate function writing, by imposing a "20 questions" style interogation to determine the actual, useful to a programmer, type.
they also slow down functions, requiring both a function execution and a comparision operation upon every type guess.
a common method is something like: if(typeof x=='string'){ };
but this has several limitations. for example: x=[1,2,3]; typeof x; //returns 'object'
safely catching an undefined is often done like: if(typeof x != 'undefined' ){ };
my function making got a lot easier after writing these simple prototypes:
//when expecting a string or array possibility: y=x.isString?x:x.join();
//more-flexible event handling:
function doBold(elm){ //accepts element object or id string... if(elm.isString){elm=document.getElementById(elm);} elm.style.fontWeight="bold"; }//end doBold
// detect an undefined variable: if( ! x.type){ alert('x is undefined')};
by tucking the protos in your script file, you get simpler, faster-executing code. (for a tiny bit of overhead)
if script length is of upmost concern (as in a bookmarklet), these smaller protos give you simpler typing: (without the speed benefits...)
Object.prototype.type=function(){return typeof this;}; //usage: switch(x.type()){ case 'string': return x; case 'date': return x.toLocaleString(); case 'array': return x.join(' '); default: return x.toString(); }//end switch;
I tried using the "For Loop" function to accomplish this but I couldn't get it to work. show me an easier way to shorten this code up
Code: function normal() { var welcomelink = document.getElementById("welcomelink");[code].....
I did try to recode everything so that the link/content and sublink/content would follow a numerical sequence...e.g. link1/content1, link2/content2, link3/content3, sublink1/subcontent1, sublink2/subcontent2, sublink3/subcontent3...etc. and then use the for...loop function but again it failed on me.
I have a js script that changes the visibilty of a selected span to "visible", but makes sure that no other related spans are visibile to the user by hiding everything first....
Is there any way to test for the presence of the Adobe Acrobat plug-in in Internet Explorer? It's doable in Netscape but so far I cannot get it to work in MSIE.
I'm trying to get JSUnit to work - I've tried everything I can think of, but I can't get the simplest of tests working - example 1 of the jsunit homepage - Both on my server and locally, nothing happens after clicking run - or if I'm lucky, a window pops up, blank, other than the heading "Tracing - JSUnit".
I had a rethink about my problem discussed in this [URL] thread, where the function won't run properly a second time if the page hasn't been reloaded. That one appears not to have a solution, and I was thinking that a reasonable plan B is the following:
a) test if the function has already been run since the page was loaded
b) if not, run the function
c) if it has, reload the page with the onClick, then run the function automatically on reloading.
the problem I envisage is will the page "remember" to run the function once it has been reloaded?Of course, it would be simpler to do it running the function automatically once the page loads, then just reloading if the test comes back that the function has been run already, but that wouldn't work for the first time you visit the page - it would start running straight away, whereas I want it to wait for that first click. Here's the page [URL] I'm working on, if you want to have a look.
I was putting some javascript in a form and doing my usual testing and swearing when the javascript did not run without an error message of any type and reverting the code back until it did run and adding code til it didn't.
Then it hit me - isn't there a better way - doesn't someone have a program or utility that will help debug Javascript ???
As I'm doing Javascript it is much harder to decode than the 30 year-old Fortran programs - they typically gave a line number and variable name that was missing.
When I did Basic before Visual Basic, the editor identified errors in real time as we typed. What is available for Javascript?
If I have to test my code on different Netscape versions, can I download and run those versions on the same computer or will it create conflicts? And if I had to test only one version which one should it be - which one has the most common elements to all the versions?
I am trying to check if my new window is open and if it is change the url. This works until I use the x in the corner to close the window. At that point i get an error when i try to open the window again. I believe that it is because newWindow is still active. How do I close newWindow when it is unloaded or closed by the x. If this is truely the problem.
determine what the first letter of a selector is? For example, if the very first letter of a paragraph is a quote (or a ‘ , or a “ , etc) I would like to apply a negative text- indent to the found paragraph so as to replicate "hanging quotes" that are commonplace in the print world. The code I've come up with is: $("p:contains(“), h1:contains(“), h2:contains(“)").css({'text- indent':'-0.3em'}); but this grabs any p or h1 or h2 that *contains* an opening curly quote; not what I'm looking for. I need it to select paragraphs that *start* with the opening curly quote. Incidentally, I could not get this to work when I was searching for $ ("p:contains(“)... but it worked when I entered an actual opening curly quote in the search (as above top). I tried both single and double escapes too.
does anyone know how I can test, in javascript, which of several buttons was pressed when submitting a form? Currently, I use the onSubmit event handler to call a form validator function, and it is in that function which I would like to test which submit button was pressed. Anyone know?
Is there any way to test if there is overflow in a text area (i.e. a scrollbar is displayed)? This is a read only field so I could change the textarea to a div if necessary.
Is there any way to detect through Javascript whether a browser supports a particular property of CSS? I am experimenting around with CSS3 and I would like to be able to detect whether the browser understands what to do with a particular setting, as in "elementRef.style.newCSS3_property = '3px' " I have heard, although I do not know if its true, that there is some way to access whether the browser knows what such a declaration means.
Code: <script language="javascript"> <!-- // Max number of items to show/hide
[Code].....
Which is designed to hide all but one of a group of DIVs with consecutive IDs in the form "listings_stations_<number>". The problem is, I won't know how many of these DIVS there will be. I know a maximum possible number though.
The script as-is works, but obviously throws up errors trying to get handles to non-existent elements/objects. How can I check an element exists before getting and setting style properties for it? I'd like a solution that works for all three browser-types the script currently works with.