I expect this is easy, but I'm not finding a simple explanation anywhere of how to do this. I have a standard HTML form like this:
<form name="new_post" action="process_form.json" method=POST>
<label>Title:</label>
<input id="post_title" name="post.title" type="text" /><br/>
<label>Name:</label><br/>
<input id=...
In an iframe how to make a div to hide and on mouse over the bottom of the page bring it to front again.
This is just like a control that appears in medial players,hide when mouse out and show when mouse over
<div>
<img src="play.gif"/>
<img src="next.gif"/>
<img src="last.gif"/>
<img src="first.gif"/>
...
How to get return value from mouse capturing function?
function getMousePosition(e)
{
positionX = e.pageX;
positionY = e.pageY;
if (positionX < 0){positionX = 0;}
if (positionY < 0){positionY = 0;}
return positionX + " " + positionY;
}
as in var mo...
Hi!
In order to make function calls to our back-end php code we've implemented something called an ActionProxy like this:
function ActionProxy(action, input, callback){
$.post("ActionProxy.php?method="+action,
{ data: input},
function(data, textStatus, XMLHttpRequest){
//return data....
There seems to be a general conclusion floating around the internet that external js files are better.
The main reasons are caching, maintenance, and debugability.
However there does not seem to be much discussion on the overhead of the 304 http requests. I went to yahoo.com, and noticed that 304's for each javascript file has an overh...
I have a GridBoundColumn in my RadGrid that should accept Zip input and based on input auto populates the State and City fields on my form. I would like to wire this up in such a way as to call a webservice on the back end or maybe repost the form only when the GridBoundColumn is changed. How do I wire this up please?
Thanks in Advance...
I am populating a table based on a javascript function. I want to limit the data entered to 2, afterwhich I hide the table. Is there a way to track how many hits the javascript code gets hit?
function addNewRow() {
$('#displayInjuryTable tr:last').after('<tr><td style="font-size:smaller;" class="name"></td><td style="font-size:sma...
I'm thinking in particular of Chrome, though Firebug would be interesting to. I've tried toString() and valueOf(), but neither of those seem to be used. Interestingly, if I take a function it'll display the function definition - but then if I add a toString() method it will show null!
var a = function(){};
console.log(a); // output: f...
I am trying to put the date and time into a form field onload. Am I doing something wrong here, I can't get it to work. Here is my code:
<HEAD>
<script type="text/javascript">
function updateData()
{
var cl_dt=new Date();
document.getElementByName("lastpost_cl").value=cl_dt;
...
I need a regex pattern(s) that will match on words before a colon and also values between 2 characters. Here's the example, I have a string:
str='`width: 1070px; padding: 0px 10px 0px 10px; height: auto; margin:0px auto 0px auto;`'
from a stylesheet, I need one array to store the property only (the text before a colon),
(prptyArra...
Is there a way using jQuery or Javascript to force a page to open in Firefox? For example, if the user has their default browser set to internet explorer, but they have firefox on their computer - open a new firefox window with the intended page. If so, I would need to check to see if they have firefox on their machine; otherwise, redi...
I have developed an app that allows the user to fill out text fields with information. I want them to be able to press a button that will make a file with data (a really long array with info on what they typed and where it should go) so they can reload the data at a later date. I don't have a server now, and I am sending this app as a st...
I originally had the following callback passed as a parameter to the javascript array sort() function:
function sortNumber(a,b) {
return a-b;
}
However this doesn't work when my array contains positive and negative decimal numbers (i.e. -107.578, 97.453 etc.) How would I modify this to sort properly?
...
I have a form with an input field where a user enters a unique identifier. I then have some jQuery code that upon the user moving away from the input field (blur) goes out and fetches details about the part and populates some fields on the page. The problem is if the user clicks the submit button before moving out of the input field the ...
I need to use a regex to pull a value out a url domain that will exclude everything but the host (ex: wordpress) and domain type (ex .com). The urls are dynamic and contain 2-3 values for each result (www.example.com or example.org). I am trying to use this expression, but I am only getting back the first letter of every item I am attemp...
Hi,
I'm trying to create a script that would determine if cookies are enabled and do some work if not. This is the code I use:
var cookieEnabled = (window.navigator.cookieEnabled) ? true : false;
if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
document.cookie = "testcookie"
cookieEnabled ...
Do you know if there is a some sort of <code> tag in JSDoc?
I need to add pieces of code in my documentation like this:
/**
* This function does something see example below:
*
* var x = foo("test"); //it will show "test" message
*
* @param {string} str: string argumnet that will be shown in message
*/
function foo(str)
{
alert(str);
...
I am doing an integration with a support system (Helpstream) and I am currently working on doing some in-app context sensitive help. I have put in a link that will send the user to a section of Helpstream that will allow them to ask a question. Problem is, there are buttons on the page that call Javascript that will bring up a lightbox w...
How would I prevent the browser from opening the pop up window that was displayed from the previous page when the user clicks the back button?
I hope that made sense but I'll explain it in point form below:
There are three pages: Page1, Page2, Page3
User loads Page1 and clicks a link to load Page2 in a new window using JavaScript (i....
http://www.tailorstore.co.uk/tailor-made-shirts
I believe it's using a form but how does it assemble the different layers of images? Is it just css?
...