I have a table of rows and columns on an HTML-based entry form that allows the user to edit multiple records. Each row corresponds to a database record and each column to a database field.
When the user submits the form, the server needs to figure out which request parameter belongs to which row. The method I've been using for years is ...
Hi,
I've got a jquery-ui button. When clicked, I want to move the browser to a url within my domain:
<button onclick='foo'>Go</button>
function foo() {
window.location('/otherpage');
}
is that the right way to do it, and address it relatively? Is there a better way to do this?
Thanks
...
I never seen this before but you can invoke the HREF attribute of a link using javascript if the HREF contains javascript:;//code......;
On my example below click on both links. they do the same thing even though they have different javascript in the HREF.
for example:
<script type="text/javascript">
function clickme(...
I really like how sites like FogBugz and Facebook offer snappy user interfaces by loading page content asynchronously.
What are some good resources and patterns for applying this to other websites? I am looking for a solution that creates a unique hash URL for each page, preserves history and basic browser functions, and degrades gracef...
So I have
VARIABLE = Math.floor(5*Math.random());
Then
.animate({left: '+=VARIABLE'}
but it doesn't work.
In my css my div already has a left attribute. If I do left: newx + 'px' it sends it to the random number I generated, meaning it jumps to the top of the page.
...
Hello. I have been searching for the solution to this problem for a while and have to come across an answer that is newbie-friendly enough for me to understand its implementation. Heres my situation:
I am creating a simple, little, Web-based document numbering system that takes data entered into a form and combines it to form a document...
I want to include a javascript file only if the browser is not IE; is there any way to do this?
...
There are many dimensional functions, inside one of them we need to use onload event (do something when page is loaded).
The problem is the code inside $(window).load(function(){}); doesn't work. But it works outside the function.
Whats the problem?
...
There are several helpful JavaScripts and .htc behaviors that patch over the holes & buggy features in Internet Explorer's rendering engine. It seems most of them have some overlapping or incomplete feature support and it's hard to decide what to use:
DD_Roundies: border-radius
Fetchak ie-css3: border-radius, box-shadow, text-shadow em...
I am using javascript to select a file and then to show the file upload progress. I would also like to be able to modify other attributes of the file.
<script type='text/javascript'>
var swfu;
window.onload = function () {
swfu = new SWFUpload({
upload_url : '<%= new_image_path_with_session_information %>',
flash_url : '/flash/s...
Has anyone used Javascript MVC Framework(s) to develop a production web app? If so what has been your experience? Thanks
...
The flow for my application, for non-logined users, looks like this:
1) non-logined user does a given action that requires login (arbitrary)
2) dialog appears for non-logined user and he logins without any refreshing of the page
3) collecting of additional information if it is new user
3) the given action should be executed
How can i...
In this page that counts the number of frames rendered and prints the FPS onto the canvas, we can see that it tops out at 100fps, which seems suspicious at the least. Why is this?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Canvas FPS artificial limiting</title>
</head>
<body>
<canvas id="c" width="320...
My problem is very similar to this post: Validate subset of form using jQuery Validate Pugin, but couldn't get anything to work.
I'm trying to use the jquery validation plugin to do partial form validation in an onclick js function.
I have a view that has a form with many divs, each div represents a page like so:
<form method="post" n...
Using the Google Chrome API tab.url value what is the best method to get just the domain from the entire value?
In JavaScript I would use 'window.location.protocol' & 'window.location.hostname'...for example something like this:
var domain = window.location.protocol + "//" + window.location.hostname;
But that gets the extension dom...
I am making a small HTML page editor. The editor loads a file into an iframe. From there, it could add, modify, or delete the elements on the page with new attributes, styles, etc. The problem with this, is that JavaScript (and/or other programming languages) can completely modify the page when it loads, before you start editing the elem...
When JSPX compiles, it automatically adds <?xml version="1.0" encoding="UTF-8"?> to top of file which causes some JavaScript code not to work on Internet Explorer 6.
How can I avoid it to add <?xml version="1.0" encoding="UTF-8"?> in output file?
...
Is it possible to track how often and/or when a Facebook user is using any facebook app? What if they have installed one of your apps, can this be used to collect statistics about app usage? For instance, you could say that a user spent 8 hours playing Farmville in the past 24 hours. Or even total usage of a specific app. What sta...
Instead of putting the code at the head or end of body (i put it at the end of body), is it ok if i stick the code inside of a JS file instead of its own script tag in html?
(i assume it works fine like any other code but i am asking in case)
...
Why is "return" used in the onclick even handler below, seems to function with or without the return specification in the onclick event for the buttons?
input type="radio" name="radCPUSpeed" value="6 Ghz"
onclick="return radCPUSpeed_onclick(2)"
The function does not seem to do anything with it, why do you need...