Hello, I'm using Generic HTML Form Processor in combination with an xampp lite installation to save data into a MYSQL database. However, I've encountered a problem while writing a multi-page survey. If users use the previous and forward buttons coded like:
<INPUT TYPE="button" VALUE="Previous Page" onClick="history.go(-1);">
<input ty...
Is there a way to select the top most DOM element at a certain x-y position with Javascript?
So give x and y, what DOM element is there?
...
Hello
Pleas help me
I had a to radio
<input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female
<div class="content">
<div id="male">male contetn</div>
<div id="female">femalecontetn</div>
</div>
I want use ajax when i click radio value male
will show div id =male and ...
I've got a multiple select that I want to use to pick which elements show up in an HTML template window. So I have several options that I want to iterate over, and based on whether it's been selected, make the preview elements visible or hidden.
I'm going for something like this:
$('#area_select option').each(function(i){
i...
I have a MySQL table called sales, containing the fields product, quantity and paid.
I am using a CMS like system which has a custom way of doing forms, and custom formfields to use.
As far as I can tell, the id given to a formfield is what is used as the table name to insert into.
My current form I am using is as follows:
<?php
...
Hi,
I'm trying to use a closure (I think that's what it is..), I'd just like to execute a function with a local variable at some point in the future, like this:
function boo() {
var message = 'hello!';
var grok = function() { alert(message); }
foo(grok);
}
function foo(myClosure) {
$.ajax({
timeout: 8000,
...
Hey, I want to redirect a page when it finish loading...
For example, when google.com finish loading, I want to send a javascript to search something...
How can I do it ?
...
I am in search for an efficient method to replace a couple of DOM Elements - if possible in one action only.
It is needed for augmenting TextNodes. If a certain word is present, it shall be wrapped in span-Tags, to which an event handler needs to be assigned later.
so if a text Node contains the word it needs to turn from
-#textNode
...
Heya, I've got some code that I think ought to be working (though I really am fumbling around in the dark here) - I'm just trying to dynamically change a class name on a div tag.
I'm trying to change the div class on id "slider" from "visible" to "hidden". Everything else about this code works just fine, but the class won't change. Wha...
I have a slideshow using jQuery and the Cycle plugin, and the slideshow uses a list of thumbnails as the "Pager" to control the slideshow. The problem I have is that there are about 30+ large images, and all of them get loaded immediately on page load, so someone with a slow connection has to wait for them to load. Is there any way to ha...
How do I determine if the .circle elements in the code below are still "onscreen"? That is are they outside the visible area of the containing #wrapper element?
Here's the code:
<html>
<style type="text/css">
body {
background-color: #000;
margin: 2px;
padding: 0;
}
#wrapper {
background-colo...
Hi
I am trying to pass a custom response header to notify my javascript the user has timed out. It works good expect when it comes to using it with jquery u.i dialogs.
I have this
$.ajaxSetup
({
complete: function (event, xhr, options)
{
if (event.getResponseHeader('X-LOGON') === 'LogOn')
{
window...
(using http://code.google.com/p/svgweb/)
window.onsvgload = function() {
function onEnter(e) {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
alert(targ.hasAt...
I have a new application starting that's using Rails 2.3.8 for stability concerns and gem compatibility, however we'd like to begin being conscious of Unobtrusive JavaScript by implementing the Rails 3 style UJS in this application. Is there any existing plugin/gem that backports this feature?
We are currently using the jrails gem to s...
Hello!
I have a form with a set of links and hidden inputs like this:
<div><%=link_to '↓', {}, {:href =>'#',
:onclick => "return moveDown(#{photo.id});"}%></div>
<%= photo_form.hidden_field :position %>
How do I change input value when link is clicked without hard-coding input ids on client side? i dont want to use selector...
Given these documents:
db.orders.insert( {OrderId:1, OrderItems: [{OrderItemId:1, Qty:1}, {OrderItemId:2, Qty:1} ]} );
db.orders.insert( {OrderId:2, OrderItems: [{OrderItemId:1, Qty:1}, {OrderItemId:2, Qty:2} ]} );
I'd like to get the count of all OrderItems where the Qty = 1 (expected result 3). This is how I think to write the quer...
I have a div I'm creating dynamically, with a unique id. I append() that to an area on the page.
Later, I try to reference that via $( '#id_here' ), but it returns nothing. Inspector in safari/chrome shows the existence and proper id of the element.
<script>
$( '#box' ).append( '<div><input id="id123" /></div>' );
//Later on in time......
How can one trigger an event locally when a field in a connected database changes? I've done some research but it seems like there there are varying and inconclusive answers to the question.
I'm building an application where users rate comments, and I'd like to have the ratings change live when they are modified by a different user. For...
Simple question which I can't find the answer to: how can I use JavaScript (or jQuery) to deselect any text which may be selected on a webpage? E.G. user clicks and drags to highlight a bit of text -- I want to have a function deselectAll() which clears this selection. How should I go about writing it?
Thanks for the help.
...
I have witnessed how Internet Explorer 8 (IE8) is in Windows XP and how it is in Windows Vista/7. Quite strangely, IE8 seems to be acting like IE7 for certain aspects of CSS and JavaScript (maybe for other elements too). Am I the one who is seeing things? Otherwise, if this is true why is this happening and what are the major differences...