I am trying to swap the selected class from tab to tab to display which one is current
Sample Code
$("li.selected").idTabs(function(id,list,set){
$("a",set).removeClass("selected")
.filter("[@href='"+id+"']",set).addClass("selected");
for(i in list)
$(list[i]).hide();
$(id).fadeIn();
return false;
});
so on click I am trying...
I've got a simple dropdown menu that I want to hide whenever you click anywhere on the page (not on the menu). This works fine in FF and IE until you add iFrames into the page. The menu doesn't hide in IE when you click on the iFrame. Works fine in FireFox.
I tried using document.onclick and window.onclick.
Any ideas?
Edit:
I wou...
Hi guys,
Is there a way to 'force' the browser to download a file instead of opening that?
<a href="file.txt">Download this file</a>
I've tried the method via js using the window.open("file.txt", "Download");
but no success.
Thx.
Updating:
I've done a php file as follow;
<html>
<a href='dl.php?bid=3'>
<php>
$sql="select barqui...
I am writing a standalone application in Java that needs to be able to call custom Javascript APIs? Is there a way to call custom Javascript APIs in Java?
...
Ok I've been asking alot of JS questions lately, and realized I just need to go learn it.
Been following tutorials at http://www.tizag.com/javascriptT very simple and straightforward.
I just want to make sure I understand this correctly. It took me a while to get it:
<script type="text/javascript">
var myString = "zero one two three f...
I am extracting content from a web page using JS/JQuery and want to write the data to a comma separated file. I know javascript doesn't really support file io and I'm trying to avoid setting up a local apache server just to process the content to a file. Is there an easier way to do this?
...
I'm using following Code to add status-messages via PHP & Javascript (Ajax):
$(document).ready(function(){
$("form#status_form").submit(function(){
var s_autor = $('#s_autor').attr('value');
var s_status = $('#s_status').attr('value');
$.ajax({
type: "POST",
url: "/request.php",
data: "s_autor="+ s_a...
Hello Everyone,
I'm looking for something that works like Checkstyle for JavaScript. I know about JSLint and I'm already using Google's Closure compiler, but these mostly check for syntactic issues. Checkstyle can check for braces on the wrong line, but it also makes it possible to write custom checks like don't use HashMap.
I'm lo...
i have a regular combobox and i am listening to the change event and sticking the selected value in an html table. this all works fine but there is one issue. Right now, the user can select the same item more than once (which i dont want to allow).
At the point of where an item is selected, i want to:
Capture the value and stick it ...
Suppose I have a simple function defined that does nothing: function fn() { }
Now, when I run toString(fn) I get "[object Object]". When I run toString.call(fn) I get "[object Function]". Does anyone know why I get a more specific type when using the call method?
EDIT: This behavior is exhibited in FireFox run through FireBug consol...
So I have a client who does not allow any server side coding, except in rare occurences classic asp, so everything is HTML and javascript.
So basically I need to build a URL from the form and then redirect. Javascript isn't necessarily my thing, but this would take me 5 minutes in asp.net using String.Format.
Is there a String.Forma...
I have some simple code to display a confirm dialog box when the user tries to leave my form:
window.onbeforeunload = askConfirm;
function askConfirm(){
return "Your answers will be lost.";
}
But this is a multi-page form and they frequently press back to change some values on a previous page.
But when they do this dialog box sti...
I have a problem with my jsp file... inside it I have a form and in that form I have an onsubmit method that is basically calling a javascript... the problem is that whenever I click on a button it always redirects me to the page, whether it's true or false
...
Hello,
I am trying to embed a sound in an auction website. I want that everytime someone's bid, a sound will be played. I tried a simple tag with given ID, and then sound.play() through javascript.
The sound is playing, but in IE, a new user is asked to install a media player extension "if he/she trusts the website".
Is there a way...
I used Javascript on the client to update an ASP Textbox control which was rendered as an HTML textbox.
When I tried to access the value in the textbox control on the server, I wasn't too surprised that the Textbox's updated value was not accessible through the normal Text property of the TextBox server control, since the state of that ...
I'm doing very frequent iterations over arrays of objects and have been using jQuery.each(). However, I'm having speed and memory issues and one of the most called methods according to my profiler is jQuery.each(). What's the word on the street about its performance? Should I switch to a simple for loop? Of course I'm fixing the many iss...
I'm doing very frequent searches in arrays of objects and have been using jQuery.inArray(). However, I'm having speed and memory issues and one of the most called methods according to my profiler is jQuery.inArray(). What's the word on the street about its performance? Should I switch to a simple for loop?
My specific function is:
func...
I have an HTML page layout - something like this:
<div id='header'>
Header content
</div>
<div id='main_content'>
some content
</div>
The content in the #main_content div may be really long, or, next to nothing (i use it as part of a template across an entire site).
What I want is for it to minimally be the height of the viewport (m...
I'm writing a ASP.NET web application. It dosen't use Web Forms or MVC. It uses ASP.NET Routing to a Http Handler, and the handler just writes html to the HttpContext.
The final output of my html is something like this:
<html>
<head>
<title>...</title>
<script type="text/javascript">
...
</script>
</head>
<body>
...
This problem is happening is both IE8 and IE7. I have a small swf compiled with flex. It's basically just a wrapper around audio streaming functionality. All the controls and such are in html with javascript. I load the swf using swfobject's "static" method. This works great in Firefox and Chrome. In IE, the swf loads correctly, but as ...