I read through Crockford's JavaScript best practise, and he stated:
There is no need to use the language or type attributes. It is the server, not the script tag, that determines the MIME type.
But I've never seen anyone omit the type attribute in their <script> tag...
Do you guys include type? Why (not)?
...
Hi,
I am creating some suspended connections to an http server (comet, reverse ajax, etc). It works ok, but I see the browser only allows two suspended connections to a given domain simultaneously. So if a user is looking at my web app in Tab1 of their browser, then also tries loading it in Tab2, they've used up the two allowed connecti...
I want to make a CSS style switcher in JavaScript, same as digg.com does here: http://digg.com/add-digg
I am having a div, in which I want to change the style of the div box on the basis of theme selection. Please give me any link or code, how I can do this.
I don't want to use Jquery, I want to develop this cod ein pure javascript.
T...
Hi
This is a pretty simple question really. If I use setInterval(something, 1000), can I be completely sure that after, say, 31 days it will have triggered "something" exactly 60*60*24*31 times? Or is there any risk for so called drifting?
...
I have a big (probably) javascript problem.
i have a long and complex script on the page based on mootools framework,
in FF and other browser everything works fine, but in ie 6 and 7 i got "error:153 (sometimes 84) Unspecified error" and the strange thing is in IE8 that show me the error "Object doesn't support this property or method"....
This has been asked few times but I think it's still worth checking with you guys for some more input.
All my websites use Google Analytics for stats. Since it relies on JavaScript I thought it was important for me to check how many people actually have JS enabled in their browsers enabled/disabled.
I remember I usually checked w3schoo...
I have an xml like this
<resultGroups>
<subGroups>
<results> </results>
<results> </results>
</subGroups>
<subGroups>
<results> </results>
<results> </results>
</subGroups>
<name> </name>
</resultGroups>
<resultGroups>
<subGroups>
<results> </results>
<results...
<resultGroups>
<subGroups>
<results> </results>
<name></name>
</subGroups>
<subGroups>
<results> </results>
<name></name>
</subGroups>
<name>myname</name>
</resultGroups>
<resultGroups>
<subGroups>
<results> </results>
<results> </results>
<name></name>...
I am having 4 radiobuttons in my web page like below:
<label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="grey" />Grey</label>
<label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="pink" />Pink</label>
<label for="theme-grey"><input type="radio" id="theme-grey" name="theme" value="gr...
I have a table that represents Tab-structure.
Some cells are set to display: none; and only the active tab is displayed.
I want to set the max-height to all of them.
To do it, I go through the array of tabs and do the following
// get the max-tab-height
for (var i = 0; i < TabPageList.length; i++)
{
// get max height
if (TabPage...
I tried to create a simple ComboBox:
var combo1 = new Ext.form.ComboBox({
store: [1,2,3],
renderTo: document.body
});
But written this way it acts strangely:
When you first time pop open the dropdown, it offers three choices.
You choose one.
But when you after that try to change your selection, the dropdown only offers one choic...
I am using yui-uploader from YUI 2.6.0
When an upload error occurs, I disable the uploader, show a warning, and then when the user clicks ok, enable it again.
Subsequent to this, selection of new files works, and the file list is populated correctly. However the uploads do not start. Has anyone encountered this problem? How do you han...
I am currently trying out Json.NET, and it seems to work well.
Any other good JSON libraries for .NET?
...
How do I format this date so that the alert displays the date in MM/dd/yyyy format?
<script type="text/javascript">
var date = new Date();
alert(date);
</script>
...
How to determine the height of an horizontal scroolbar, or the width of a vertical one in javascript ?
...
I am working on a site to the specification of a designer who loves to put styled scroll bars on the page (not the main scroll bar on the right, but for various fixed-height divs on the page, when the content overflows).
I'm not asking if this practice is "right" or not, and I know it's generally accepted to be a bad idea in terms of us...
I need a solution for round corners using javascript with or without jQuery in IE8 standards mode.
...
Hi,
I have a bunch of strings extracted from html using jQuery.
They look like this:
var productBeforePrice = "DKK 399,95";
var productCurrentPrice = "DKK 299,95";
I need to extract the number values in order to calculate the price difference.
(So I wend up with ≈
var productPriceDiff = DKK 100";
or just:
var productPriceDiff ...
if I have 2 frames of a frameset on 1 page, is there a way for JS to access elements from the opposite frame?
Thanks!
...
I want to output the users system timezone, e.g. "EST". How can I do that, preferably using Javascript, though I could do it on the PHP side as well, if that's significantly easier.
...