I have been working with with window.promt() and i noticed a weird behaviour.In some cases (i do not known why) my prompt cannot get over a certain limit of characters. But in some other cases it can get as many characters as i want.
Dont know how to put this. In my application i had one jsp where i did some modifications in the java script function and increased the maxlength of a field.
Just these two major modifications i did.But strangely everything got screwed up the function is not being called and many other java scripts func are not being called. Many buttons are not behaving strangely. That jsp is a very big one and a part of a major colossal application so i am not pasting it.
I have to change dynamically all hyperlinks, when the html-page is loaded at the client. This works fine, except in the following scenario:
When the innerText of an anchor contains an '@', the InternetExplorer changes the innerText-Property to the HREF-Property. I have checked this with MoZilla/FireBird and Opera and there is no problem!
To explain, what i mean, see following example: function atTest(){ for(var i=0; i < document.links.length; ++i) { document.links[i].href = document.links[i].href; }
}
Now you need some anchor tags - notice the '@' as inner Text:
<a href="http://www.somelink.org/">Text before @ and after</a><br> <a href="http://www.somelink.org/">Text before @</a><br> <a href="http://www.somelink.org/">@ before text</a><br> <a href="http://www.somelink.org/">Text before at and after</a>
If you load the page, InternetExplorer will display the HREF-Property instead of "Text before @ and after" - all other elements are shown correctly! It doesn't bother other browsers: Opera/MoZilla shows _even_ the first element with innerText.
My system: Windows XP SP1, InternetExplorer SP1, Firebird0.7, Opera 7.23
Has anybody out there an idea, why IE behaves like this? And how I can work around this?
This works and does as intended in all browsers other than (you've guessed it) MS IE wherby a 403 Forbidden error is generated. Anyone got any idea why this is the case and how I can get around it?
I am working on an interest and investment calculator for a class project. On my list of drop down options, one of the options isnt an integer value like the rest. It's value is "other", while the other three are 1000, 5000, 1000, and 25000. What I would like to do is when the user chooses the "other amount" option from the drop down list, a prompt window will come up asking the user for an investment amount. I am having problems creating a function in my javascript file for this, and then taking the value entered and assigning a variable in another function with that new value so that it calculates with the users input. Please help. The first part of the attachment is the label with the "other" value I explained. And the second piece of code is my mess of a function that I tried to create for the prompt window to come up and store the users value and then change the value of the option.
Is it possible to do an ie print from javascript that does not bring up the print dialog? I'm in a situation where i need to load a sequence of files into a browser and print all of them without any user interaction.
This is what I want to do. I have a form, with a table and a button on each row. When I press the button, I want a js prompt where I can enter a value. Then I want to be redirected to a page with that value in the querystring. This is what I have so far, but I am not redirected.
<script LANGUAGE="JavaScript"> <!-- function prompt_getvalue(tekst) { var value=prompt(tekst); document.location.href = "?js=" + value; } // --> </script>
I have 9 boxes which I can drag around an invisible grid however when the onMouseDown function is called for the first time on each of the boxes, they behave erratically, then once all boxes have been clicked once, the entire script works as it should. I've tried using default values when declaring the variables however it doesn't seem to do anything.
I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz 1.7.12 (linux kubuntu). It does work with konqueror....
I have a table with 5000 rows. In each row I have an html element. myElementList is the list of those elements. Now I need to select all the tr's of these elements. I am using the following code.
[Code]...
This work great in FF. But when I run the same in IE 8. The browser hangs out and a popup messgae appears that propmt for to stop the script.
I am trying to implement a rubber band/image selection script. For that I need to remove the default drag behaviour on an image. I am able to do this in IE but not Netscape. Does any one have a solution?
Pls look below for IE code:
var moz = ((document.all)? false : true); var ie = ((document.all)? true : false); var ElementUtil = new Object(); ElementUtil.addEventListener = function(o, type, handler) { if(ie) { o.attachEvent("on" + type, handler); } else if(moz) { o.addEventListener(type, handler, false); } }
// Removes default drag behaviour on image in ie ElementUtil.addEventListener(img, "drag", function() {return false;});
I have include a demo that should make it clearer, as to what I want to achieve. Ideally, each box will show a unique overlayed message as the user's mouse enters the box and hide once the mouse leaves.
I have to implement Tablesorter Pager plugin on Dynamic Table which will be cleared(emptied) out everytime. I triedby adding pager to [URL].. The sorting is working fine for first time but when i click on append url, the sorting is not working and the pager is skipping pages for large dataon subsequent clicks. I tried all the solutions ( appendCache, update,bind) but nothing seems to be solving the problem.
As implied by the subject, my question concerns jquery.cycle plugin and I have 2 questions. I tried to find answers searching the web, but didn't find any. I'm currently using cycle to built a photography website and enjoy it a lot so far. However, I'd like to display/update the image number at the same time as the legend (taken in the "alt" of the images). i.e, I'd like to be able to write something like "current frame number / total number of frames" in a div, somewhere. It looks like somebody heavily edited the cycle plugin for the[URL].. to do what I want, but it's not really made in the most elegant way (the cycle plugin is modified, the div name is hard written in the code...). If I find no workaround, I might do it the same way, but I'd prefer avoiding modifying the plugin, if that's possible. So here's my first question : Does anybody know how to display the frame number (and total number of frames) using the standard plugin, only putting some code in the after: function callback ? Second question : with IE7, if all images are already in cache, they all display on the page before the cycle starts and hide them. (one of the page is here : [URL]...
i have placed some image indide a i frame which i created dynamically .when i do mouse wheel above it it goes up nad dow i want to stop and happened only in firefox.
I'm trying to send a byte array (JPG image) from javascript to a servlet for processing. I'm using Base64 to encode the byte array in javascript, and then a base64 decoder in the servlet to decode it.
The thing is, that even though the String has the same length on both sides, the decoded byte array is shorter then the original one. I've tried a couple of different implementation on both sides, with the same results.
Is there a way to override the default behaviour for single selects which makes it impossible to unselect a selected item?
What i need is: when someone clicks on an option, if it isn't selected is should be selected, but if it's already selected then it should be unselected.
I have javascript calculating the total price of all the products in a shoppping cart. The prices are in the format of 10.99 or 5.50 or 10 ete.g if there are five items bought for 10.99 and 1 bought for 10, the script will multiply 10.99 by 3, then multiply 10 by one, then add the two results.
The resulting number is sometimes right, but quite often it ads an extra '000000002' or so to the amount??
Yesterday I discovered a problem on one of my sites: escape function was encoding the same string Salò in two different ways:Sal%F2Sal%C3%B2 This was happening on Firefox 2.0.0.3. In Opera 9.20 was encoded ok every time.
So, in Firefox was a russian roulette . Sometimes was encoding the string like I wanted to, sometimes not. As a solution I use encodeURIComponent(), but the behavior of escape() seems strange to me.