I have some extensive animation going on in this script. I have all the behavior I want out of this script. A 3D carousel interface, each window in the carousel is a separate UI window. It uses active scrolling for navs and content...like (iphone).The problem is that I have optimized to my best and still cant gain any performance out of IE. It runs pretty fast in FF, and in Safari. I have reversed loops, I have vared all my Math, I have stripped equations, could do more I guess, and I have made attempts at preventing even bubbling. I have minimized the use of <img> tags as well. I have even cached most methods and use a constructor method to create new HTML elements.At this point I am starting to feel like I am getting into techniques and areas of JS I just don't understand well.Here is example of a method I would like to optimize:
this.anim = function () {
var s = Math.sin(s3D.A * .01);
var c = Math.cos(s3D.A * .01);[code]....
We have a js heavy web-ui. In the production environment it runs minimized, composed from 10 or so js files. When we have a js-error of some sort (we have about 100 users and growing) we write the window.onerror information to a database. Only, it is not very helpful since linenumbers mean nothing in the intelligeble code.
Is there a minifier that tags the result that would allow translation of linenumbers? Is there some other method people use to solve this problem?
When users manually minimize the website window I need the window to minimize up to a certain point and go no further. for example I need the minimum window size to stop at 800 x 600 and get stuck there even if a user tries to minimize it further.
The code that I am trying to play around with is the following with onresize function but I am not sure how to make it give me what I need.
Code: <head> <script> function OnResizeDocument () { alert ("The size of the window has changed.");
I have a very simple PHP script that is reading a plain-text CSV file and parses it out into into a HTML table to display the data. No biggie.
What I want to do is while keeping the browser window for that page open and minimized, i want to be able to maximize the window when the text file has been update. This is a small script that is being used for some dispatchers at a taxi company and the popup window is supposed to be their list of customers to pickup. The company has several dispatchers who are constantly updating a proprietary system, and this system has a special program that spits out the data for customers who need to be picked up. Every dispatcher has a link to this PHP webpage to display the next available pickups. The only problem is that they want to be able to minimize the browser window and have it open automatically when a name has either been added or removed from the pickup list.
Is is possible to integrate a javascript function to do this with PHP?
Can't seem to make it work, I have seen many examples but they are all just for 1 div tag. When i trymore than one it doesn't work anymore.The first one works, if i have more than 1 then the other don't work.
using the following jquery $(document).ready(function(){ $("#toggle-text").click(function () { var divvalue= this.value;
Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags?
I really know nothing about how to code JavaScript (I know what it is and what it does) and I need a script to go in the head of my page and look for all <a> tags that have <img> tags inside of them and add a rel="lightbox" attribute to them.
I have a web form that needs to be printed for signatures. Problem is the form is just a bit too big and always prints on two pages. Is there a meta tag that will tell the printer to print the document on one page...or is there a meta tag I can use to print at 80%?
I have a div which includes many others tags (a, input, any others links). How can I disable the whole div? I want to any of the included tags may not be enable.
I'm tryng to make two boxes on my page always the same hight, no matter how much text is inside one of them.
So the boxes will always be the hight of the box with the most text.
you can see what I meen here:
[URL]
I would wan't the two boxes to be the hight of the one to the left with the most text.
At first I thought it could be done in css, but I was told that I needed javascript to do it. And I don't have so much experience with javascript, but I can try
what I'm trying to do is get text from between two tags, just like the title says. Now I know I can get that through the innerHTML property, but its just that, I don't want HTML, I want plain text. Consider the following example.
<span id="p-5641"> This is <strong>strong</strong> & you should really put <em>emphasis</em> on that <a href="#">anchor</a>.<br>Line broken </span>
Now, what I want is, to get the text from between these span tags. That can be done by refering the ID of the span & innerHTML but that would give HTML & I want to strip off the HTML from it, so that I'm left with plain text, like
This is strong & you should really put emphasis on that anchor. Line broken with <br> & <p> tags preserved.
I have a couple of DIV tags I am trying to display. I thought it would be real simple but it is not.
1) A div tag with nothing in it - it needs to fill out the screen with a background color. It only shows a small portion along the top in IE but seems to work in Firefox.
2) A div tag with an image in it. It goes over the top of the previuos one. I would like to it centered on the screen, but it doesn't. Code:
PHP has a function called nl2br() which takes all the newlines in a string and turns them into break tags <br>. I need to do the same in javascript. Is this about right? I'm not sure how one is supposed to reference invisible characters in Javascript strings. I took an example on the web and tried to modify it to my uses.
function nl2br_js(myString) { var regX = / /gi ;
s = new String(myString); s = s.replace(regX, "<br /> "); return s; }
After looking around quite a bit using Google, I still couldn't find out what the gi in the above example is for. What is it?
If using an onclick event handler to execute javascript when an anchor element is clicked on, what should the href attribute be? #? javascript:void(0)? Something else?
I would like to include extra "hidden" information in a generated HTML page that can be used by javascript functions.
I realise that most browsers seem to ignore any tags and attributes they don't understand, but from what I can tell the standards do not allow me to make up my own tags or attributes as they will fail validation.
is there any standard element name that can be used for such a purpose i.e. passes validation but never produces any output (and ideally allows nested elements to be rendered normally too)...
I have a page which has multiple span tags, I would like a javascript function that can look at each of these span tags for me. Depending on the what the user is doing there could be a different number of span tags so I don't want to hard code them.
I have documents that I want to automatically add additional meta tags to. The documents already have some meta tags and I want to keep them all together, so I want to add my new meta tags to the end of the existing ones... can someone help me out with a script to do this... example below.=
Does anyone know of a way to wrap custom tags around selected text using execCommand or otherwise?
I am developing a rich text editor for use in a web site and while there are a few decent ones already floating around I need to implement a few extra bits of functionality. Specifically tool tips. Idealy I'd like to wrap custom tags around selected text using execCommand. Ie "Selected Text" becomes: