Validate Half Form OR Other Half?

Jun 25, 2010

I have a form with 3 sections. The first is always required. The second OR third needs to be completed.The form is used for booking holidays OR flex time in the company I work for. [URL]I have it so the first section is validated, and works fine. I can't work out how to have it pass validation if Holiday OR Flex is done. I can only get it to pass if both are filled in.Here's the code im running:

PHP Code:

<script language="Javascript">
function validate(f){
if(f.Name.value == "")

[code]....

View 10 Replies


ADVERTISEMENT

Resolved Js Animation Function Half Works, Cant Understand Why Other Half Doesnt?

Jun 21, 2009

iam either being really dumb or something is way wrong with the code. i am trying to create a fade in / fade out effect. i know there are tons of scripts out there that do this, but i like to do it myself. my script is only working in firefox at the mo (when it works il cater for other browsers). basically i can get the fade out part to work, but when i want to fade back in it does nothing. now logically id of thought that fading in would be the same as fade out but reversed.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

[code]....

View 2 Replies View Related

JQuery :: Swapped Image Cut In Half?

May 27, 2010

I'm building a little website for a friend of mine. On the Team-page i'd like to swap the standard headerimage with an animated gif of the person, by hovering over the persons name.So far it all works just fine, with one "little" problem.The first time i hover over a link, the animated gif is loaded, but cut in half and only the top half of the image plays the animation. Since this might not make any sense you can take a look at the site right here.

This is the script i'm using:

$(function(){
$(".link1").mouseover( function(){
$('.imagefield').attr('src', '/drupal/sites/default/files/link1.gif');
$('.imagefield').attr('height', '350');

[code]....

At first i thought it might be the images, but i tested it with other animated gifs too, with the same result..

View 1 Replies View Related

Only Half Validates, Otherwise Code Works Well?

Mar 25, 2011

I am having trouble getting my code to validate for my speed/distance calculator.I have 2 input prompts: 1 for hours and 1 for minutes. The issue is I can put a number for hours (e.g 7) and W for minutes and the result will display distance is NaN, whereas I am expecting it to alert user to input a valid number. The same issue applies if I switch the order of isNan(hours) and isNaN(mins)

[code]....

View 3 Replies View Related

Open A New Window Half The Size!

Apr 29, 2007

How do I do if I want to open a new window half the size of this when I click on a link?

View 1 Replies View Related

JQuery :: Hide Only Half Of A Div And Then Reveal It On Hover?

Sep 23, 2010

Anyhow, as per my new site design, I need to have a DIV on the page, containing an image, some other divs, and some text within it, but have HALF of it concealed (see attached spotslideprev1.jpg) until the user hovers over the div, revealing the complete DIV (see attached spotslideprev2.jpg).I think it's pretty selfexplanatory. If anyone has any ideas or tips, I'd love to hear them!Attachments spotslideprev1.jpgSize : 209.88 KB Download : 635

View 3 Replies View Related

JQuery :: On Page Load Only Working Half The Time?

Feb 7, 2011

I'm helping out a dev at my work who is having a problem.as a function to where it should scollTo (using scrollTo plugin) on page load to the starting "page". I don't think it is a plugin problem though. It only loads correctly about half the time, but if you hit refresh it will work?Can anyone tell me why this is? It's like it doesnt execute it everytime the page loads

View 2 Replies View Related

JQuery :: Recursive Function Works Only One (and A Half) Time

Dec 2, 2010

I've got following function:

[Code]....

I would like to run this in recursive mode, and I'm starting the function with:

$(function(){
$.bubbles();
}

The problem is, that function works only one (and a half) time. Console shows: start callback start I have not idea what is a problem. Function needs to be run constantly.

View 2 Replies View Related

JQuery :: XML Response Truncated To About Half Of Full Length

Mar 29, 2011

I'm trying to get an XML response from a server using:
$('#update-target a').click(function() {
$.ajax({
type: "GET",
url: "[URL]",
dataType: "xml",
accepts: "application/xml",
success: function(xml) {
}});});
And the XML response is being truncated to about half the full length (looking at the response in the Charles http proxy). If I load the same XML from flash, I get the full response. This is a relatively large XML document.

View 5 Replies View Related

RemoveChild() - Doesn't Remove The 'splash' Element In Half A Second?

Feb 18, 2010

I have this code:

Code:
<html>
<head>
<style type='css/text'/>
splash { position:absolute; left:0px; top:0px; z-index:2 }
page { position:absolute; left:0px; top:0px; z-index:1 }
[Code]....

Why doesn't this remove the 'splash' element in half a second?

View 6 Replies View Related

Users Do Not Scroll Down Page And Try To Look At The Second Row Of Images Then The Bottom Half Of The Image Is Cut Off

Feb 6, 2009

I am trying to build on my weather website. On the page I am working on I have many images. These images are best viewed at large sizes, but if all of them were large, the page would look terrible, so I have them set to take the large image, shrink on load, enlarge on mouseover, then shrink on mouseout.. the problem is, if users do not scroll down my page, and try to look at the second row of images.. Then the bottom half of the image is cut off.. So what I need to do is Figure Out how to get my images to either appear and center of page on enlarge, or to have the page scroll down on enlarge..

View 3 Replies View Related

Selecting 2 Half Hour Slots By Checking Radio Button?

Mar 27, 2009

I have some time for selection on my form, 30 minute time slots by default, what I would like to do is if a user has checked 1 hour then the selected time along with the an extra 30 minutes is selected

<% set Rs1 = objconn.execute("SELECT * FROM tEvents ") %>
<select id="eventTime" name="eventTime" onchange="checkTime();">
<option class="xxx" value="1">Please Select start time</option>
<%Do While NOT Rs1.EOF%>

[Code].....

View 1 Replies View Related

Generate Dynamically Every Half An Hour Timing From 2 Am(round Up) Till For Example 11 Am?

Jan 16, 2010

1. i want to get the current time, possibility no from client computer ( sometimes their time is wrong)? i dont know whether can achieve but if cannot, then never mind, just get from client computer.

2. for example now is 1:25 am, i want to generate dynamically every half an hour timing from 2 am(round up) till for example 11 am

something like

<select>
<option>2:00</option>
<option>2:30</option>

[code]..

View 5 Replies View Related

Automate A Process - Open A Particular URL And Download A File Say ABCD.log Every Half An Hour

Jun 21, 2010

I want to open a particular URL and download a file say ABCD.log every half an hour. (the same file) Is there any way i can automate this process using java script or any other method?

View 2 Replies View Related

InnerHTML - Update Cells By Using A Drop List Selecting From Half A Dozen Items

Oct 1, 2009

I have a dynamic table where I would like to update cells by using a drop list selecting from half a dozen items. I have searched W3Schools for a tutorial but I am obviously looking in the wrong place. The working code I have thus far is:-

function insRow()
{
var x=document.getElementById('myTable').insertRow(1);
var a=x.insertCell(0);
var b=x.insertCell(1);
var c=x.insertCell(2);
var d=x.insertCell(3);
var e=x.insertCell(4);
var f=x.insertCell(5);
[Code]...

View 2 Replies View Related

Photos Are Loaded Quickly But With A Weird "frame" Or Line Box On The Bottom Half Of The Site?

Jul 23, 2009

the photos are loaded quickly but with a weird "frame" or line box on the bottom half of the site. This only happens in IE7.

View 3 Replies View Related

JQuery :: Make An Animation Of A "half Pie " In Js?

Apr 18, 2011

I need to make an animation of a "half pie " in js Here you can see as I did in Flash:[URL]...but I can not create the animation from left to right as I did with flash.

View 2 Replies View Related

Jquery :: Validate Input Array Form With .validate.min.js?

Nov 9, 2011

How can i validate x inputs with name array like init_date[] with this plugin [URL]

$('#form').validate({
rules: {
year:{required:true,number:true},

[code]...

View 4 Replies View Related

Submit Form, Validate Form, Set Cookie, Send Email, Download File

Jul 23, 2005

I have a form built and on the onclick event I validate all of the
fields and then if the form is ok, on the submit event I run a
javascript function to set a cookie and download a file from the
current window.

I have a cgi script provided by my web host to send the contents of the
form through email but they only show me how to use the cgi script to
send email through the submit event of the form.

ie. <form name="downloadform" method="post"
action="/cgi-bin/cgiemail/mailtemp.txt" onSubmit="return
Validate(this)">

Can I utilize the cgi script/link from my javascript function and still
send the contents of the form through the cgi email??

View 1 Replies View Related

JQuery :: Validate A Form Before Sending It With Form Plugin?

Jul 23, 2009

I am currently trying to validate a form before sending it with the jQuery Form Plugin.I can get them working but it is always one or the other, I can't get them both working.

[Code]...

View 2 Replies View Related

Validate A Form - Errors In The Form Lists Them In A Div Tag On The Top Of The Page

Jul 28, 2009

Im trying to validate a form using javascript. If there are errors in the form javascript lists them in a div tag on the top of the page. the problem is that whenever i click the submit for the first time everything is working but after i get the errors if im clicking submit again, it's submitting the form regardless of the errors...

Attached is the code

View 4 Replies View Related

Validate A Form

Apr 19, 2006

I am wanting to validate a form and I cant seem to get one validation to work. The first two work, but the thrid I want to have a max length of 30 and I cant ssem to figure out
how to do that.

var msg = "";
if(document.jobOpening.jobCity.value == ""){
msg = msg + "Please provide a Job City before submitting the form.";
alert(msg);
document.jobOpening.jobCity.focus();
return false;
}
if(document.jobOpening.jobCounty.value == ""){
msg = msg + "Please provide a Job County before submitting the
form.";
alert(msg);
document.jobOpening.jobCounty.focus();
return false;
}
if(document.jobOpening.jobName.value =="", "maxlen=30"){
msg = msg + "Please provide a Job Name Less than 30 Char. before
submitting the form.";
alert(msg);
document.jobOpening.jobName.focus();
return false;
}

View 8 Replies View Related

Validate Form

May 11, 2006

How to validate check box and drop down menu in one form?

View 4 Replies View Related

Can't Get To Validate Form

May 1, 2009

I looked at some of the other post on validation but I still can't figure out what I'm doing wrong to get the JavaScript to validate my form. Maybe some fresh new eyes.

Here is the JavaScript:

<!--
var validations = new Array();
// Define which validations to perform. Each array item
// holds the form field to validate, and the validation

[Code]....

I just tried to validate the first name, last name and address for now until I get it to work.

View 2 Replies View Related

Validate My Form.

Sep 25, 2005

I have a school project that requires form validation. I have created the form, with all the fields and all that...can you help me script the "form validation" part? I have included comment tags on what to validate.

View 4 Replies View Related

Validate Form For Email

Jul 23, 2005

The following code asks the user to sumbit a name, email address, and some
text for a quotation via a FORM. I have written a javascript function to
evaluate the fields in the form and pop-up a message to tell the user if all
the fields have been fill-out. If the user has missed some information the
form re-displays with red "alerts" indicating where the user have missed the
information while re-populating the information the user has submitted.

May question is, after the user has successfully filled out the form, how
can the submit request be forwarded to another jsp so the information can be
emailed to me. I have written a jsp to accept the request and email it. This
works if I remove the validation code. I am not familiar enough with
javascript to be able to figure this one out. I may be on the wrong track.....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved