Action Select Not Working

Dec 1, 2006

I am trying to get my action page to work where if the user selects yes to Employee radio button then it goes to a certain page, if not it goes to another page. It doesnt do anything on submit and when I do an alert on alert(document.myFrm.employee.action) for test only form submit it gives me Undefined message.

Please advise what I am doing wrong?

function mySelection()
{
if(document.myFrm.employee.value == "yes")
{
document.myFrm.employee.action='gotoEmployee.cfm'
}
else
{
document.myFrm.employee.action='secondPage.cfm'
}
}

...
<form name="myFrm" method="post" onSubmit="return mySelection();">
<input name="employee" type="radio" value="yes">
<input name="employee" type="radio" value="no">
...

View 2 Replies


ADVERTISEMENT

Ist Of Checkboxes From Which The User Can Select 1 Or More To Check And Perform An Action Upon?

Feb 11, 2011

As this forum has been so helpful before, this time it's a JS question:I have a list of checkboxes from which the user can select 1 or more to check and perform an action upon.Thus, all checkboxes have the same "name" (in ASP code, since it's DB-related):

response.write "<input type=checkbox name=""FieldName"" value="&obj("OrderID").value&">"
I call JS using a button:
<img src="images/TrashBin.png" border=0 onclick="Delete(document.FormName.FieldName)">

[code]....

View 3 Replies View Related

JQuery :: For An Action On A Element, Stop The Action On His Parent?

Dec 2, 2009

Is that possible when you click a child that the function on the parent don't run.

In these example, if I click on 'h2 > a
', both elements triggers functions ('h2' & 'a')
What I wan't is that if I click on 'h2 > a

[code]....

View 1 Replies View Related

JQuery :: Stop A Action Hover And Just The Last Action Happen?

Jul 23, 2011

I need to know how stop a action hover and just the last action happen

View 2 Replies View Related

Changing The Action Of A Form With An Input Named Action?

Feb 16, 2009

I have come across a very interesting problem that seems to be impossible to solve. Basically a web application that I am working on relies on a JavaScript function called go to change the input named view to the page name and submit the form. This form's type is post, so no values are included in the actual URL string. There is also another input called action and it's value is view. This is to tell the application that the user would like to view a page. The problem is because of the variables being of method post, page refreshes and back and forwards return errors because the post variables view and action aren't sent with the required data. To somewhat solve this problem I have created a feature that tells the application that if the post value page is empty then to try and get a GET var called page. To insert this var into the go javascript function I simple add this code

document.go.action = document.go.action+"&page="+page;

This line basically adds &page=[page] to the action of the form. The problem is, this code doesn't work because action is also the name of a form element. Referencing document.go.action refers to the input element named action and not to the form's action. Changing the named of the action input value is out of the question (Way to much changing of code, and possible room for error). What can I do to change the action of the form without referencing the input named action. Here is my go form and the JavaScript code:

<form name="go" action"index.php?sid=123" method="post">
<input type="hidden" name="action" value="view" />
<input type="hidden" name="view" value="" />
</form>

[Code]....

View 6 Replies View Related

Pass Text From One Select Box To Another Select Box Using The For Loop To Check The Existence Of An Item But It Is Not Working?

Aug 28, 2010

i am trying to pass text from one select box to another select box. The logic is if 10 are added, no more passing must happen. Also if an item is already added, it mustn't be added again.I am using the for loop to check the existence of an item but it is not working: what am i doing wrong?

Code:
function PassSelectValues(){
//pass values from select boxes to select boxes
var counter;[code]....

why isn't counter incrementing at all? The alert message box does appear saying item exists but the item gets added anyway.

View 1 Replies View Related

JQuery :: Select All Fieldsets In A Form Which Does Not Contain A Div With Class "Action"?

Aug 2, 2010

How can I select all fieldsets in a form which does not contain a div with class "Action"?

View 3 Replies View Related

Change The VALUE In <form Action="site.php?s=VALUE"....> With A <select>field?

Dec 13, 2009

need to change the value in <form action="server/script.php?s=VALUE"> with a <select>fieldI've tried this but it doenst work.

HTML Code:
<head>
<script type="text/javascript">

[code]....

View 1 Replies View Related

AJAX :: Stopped Working - When A User Begins To Type Their Search, After 3 Characters,script Jumps Into Action And Shows A List Of Results?

Mar 27, 2009

I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.

View 1 Replies View Related

Working With Select Boxes - Code Is Not Working?

May 3, 2009

I am trying to create 3 boxes with 2nd select box content to be uploaded on the basis of value selected in first box and third box list should be uploaded on the basis of value selected in 2nd box.i have written coding for that as below but it is not working .

<html>
<head>
<title>Search Website</title>[code].....

View 1 Replies View Related

Jquery :: Select Nth Element Not Working?

Mar 22, 2010

I need to replicate a table layout but with divs and fieldsets - to avoid this invlaid form & table layout -

Code:

<table>
<form><tr>cells & fields</tr></form>
<form><tr>cells & fields</tr></form>[code].....

matchwdth() is a function that makes all elements passed to it the same width (that of the widest element).so if there are two div.row each with multiple div.cell children, I want to make div.row[0] div.cell[0] the same with as div.row[1] div.cell[0], AND div.row[0] div.cell[1] the same with as div.row[1] div.cell[1] etc etc

problem is with this line

Code:

var _cell = _row.find('div.cell').eq(_item);

that seems to only pick up the div.cell elements in the first parent div.row - subsequent div.row's are ignored.if I do an alert on (_cell.length) I get 1 (even when there are multiple div.rows)

View 6 Replies View Related

Js Not Working. On Select Disable Other Fields?

Mar 15, 2009

i have found the following code and altered it to disable certain fields in my form.but it does not swap the fields around from disabled to enabled and visa versa.what am i doing wrong? mthe following javascript code is in a file and i use the <link... > method within the <head> tags to include this script

function txtDisable( theForm ){
cBox = theForm.NAME;
if( cBox.options[cBox.selectedIndex].value == "st" )[code]....

View 6 Replies View Related

Chrome: Select Blur Not Working

Jan 21, 2011

I have the following code that should hide the dropdown part of a select box when clicked (don't ask why, this is part of a separate project). see a simple example below:

<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script>
<select name="select1" id="select1" onfocus="$(this).blur();">
<option value=""></option>

[Code]....

This all works fine in IE and FF but in chrome the options are still shown after clicking the element. I've been racking my brains for hours on this and, no matter what method I use, I can't get this to work correctly in Chrome.

View 2 Replies View Related

Select Drop Down Onclick IE Not Working?

Jun 10, 2011

[URL]you see the Select Drop Down called: Fonts, well if you choose say Airstrip or Arial the image should change but the problem i am having is. It works in IE9 and FF but doesn't seem to work in IE7, IE8 or Google Chrome i hope someone can help here is the code:

<?php if($option['mode'] == "select"){ ?>
<select name="option[<?php echo $option['option_id']; ?>][]"id="option[<?php echo $option['option_id']; ?>]"<?php echo $option['option_value'][0]['extra']['reqd'] == '1' ? ' validate="required:true"' : ''; ?><?php echo isset($option['option_value']

[code]...

View 9 Replies View Related

JQuery :: Select Next Element But It's Not Working

Jun 9, 2011

I'm trying to select the next element but it's not working. Please see my code below:

Code HTML4Strict:
<div id="content1" class="tabcontent" style="display:block;">
<table style="width: 305px;" cellpadding="7" cellspacing="0">
<tr class="even-row-light"><td><a class="accessoriesAdd" rel="1872">Add to Basket</a><div class="accsImg">
<a href="/product/1872/hoya-standard-uv-77mm-filter/"><img src="/images/prod/No_Image.jpg" alt="Cannot find images!" width="60" style="border: solid #222 1px;" height="37" />
</div>
[Code]...

View 1 Replies View Related

Working Out Which Select Belongs To Which Option

Sep 4, 2011

I've got a snippet of code I'm trying to write and I have worked out how to extract from an option the value and its id but can't seem to see how to match it to its select.

HTML Code:

var table = document.getElementById("x");
var option = table.getElementsByTagName("option");
for (var i = 0; i < option.length; i++) {

[code]....

View 6 Replies View Related

JQuery :: Combination Of .slideDown() And .select() Isn't Working?

Oct 26, 2010

When I do this:

$("#login_box").slideDown();
$("#username").focus();
$("#username").select();

The username is selected but then it goes away just after the login_box is shown. Is there any way to make it keep the selection?

If I do this, it works:

$("#login_box").show();
$("#username").focus();
$("#username").select();

View 1 Replies View Related

JQuery :: .html(data) In Select Box Not Working?

Oct 19, 2009

I have this function:

<script language="javascript">
$(document).ready(function()
{
$("#place").change(function()

[code]....

I does work fine on firefox.. but as normal on IE does not load the result form types.php... .html(data) is not showing up.

View 1 Replies View Related

Select All Checkbox Script Working On One Page But Not Another?

Nov 17, 2010

I have a script that checks and unchecks all boxes depending on the current state of the box. I have used it on one page and it works perfectly fine... copied it over to a new page where I wanted to reuse and can't get it to work.

<script type="text/javascript">
function check_all(form, input_name, self){
if(!input_name){
return;
}
[Code]...

View 1 Replies View Related

Validate 2 Select Boxes - Code Is Not Working?

Nov 15, 2011

PHP Code:

<select name="sltDay">
<option value="">day</option>[code].....

If I tried to use the code to validate Day it won't work. Is there anyway to verify both select boxes?

View 1 Replies View Related

JqTransform Plugin Select Fields Not Working?

Mar 14, 2011

I am a big fan of the jqtransform plugin [URL]...e/jqtransform/ but have discovered that when you add to many select fields on a page, the bottom half of the select fields do not open the option fields.

I have a form which takes an passenger's date of birth, but there can be up to 9 passengers on a booking, so for every passenger there would be 3 select fields for the date of birth, the day, the month and the year. When I do not use the jqtransform plugin to style the select fields it works perfectly, but when the plugin is active the 3rd or 4th passenger's select fields's click event does not work anymore.

The code for this plugin can be found at the above mentioned url. Even you add more select fields on there example the bottom select fields do not work.

View 1 Replies View Related

JQuery :: Dynamically Created Select Option Not Working?

Jun 24, 2011

I am creating a dynamo form but <select and <option does not show.

How do I make sure that they are created on the fly?

jQuery("#dump_data_box").append('<select id="thisid" name="value_name[]">');
and later
jQuery("#dump_data_box").append('<option');
///
if (v==k2) jQuery("#dump_data_box").append(' selected ');
//
jQuery("#dump_data_box").append(' value="'+k2+'">'+k2+'</option>');

But they do not show in the <div>.

View 1 Replies View Related

JQuery :: IE8 And .change Function On A Form Select Not Working

Jul 5, 2010

Having an issue with the .change functionality on a form selector in IE8 which I have not been able to figure out, and is now driving me insane.

When the select is change to an item with a value of 1, it is supposed to set the values of two textboxes to blank. Eg;[code]...

The most interesting thing is when I run this through jsfiddle to test it - it works perfectly there, but not when in our actual website (an intranet with a FQDN, and IE8 is set up to run such pages in standards mode, and not the default of compatibility mode).

Using latest version of jQuery (1.4.2-min), and no success. Same issues occurred when trying it in 1.2.6.

View 2 Replies View Related

JQuery :: Get The Draggable Ui Working With A Multiple Select Field?

Jul 17, 2009

Trying to get the draggable ui working with a multiple select field, but doesn't work. Does it actually work with option fields ?

$("select option").draggable();

it adds the ui-draggable class to the options fields, but they are not draggable :(

View 2 Replies View Related

Simple 'select Checkboxes' Code Not Working In Firefox

Mar 31, 2006

Just wondering if anybody went through this before. The following code works fine in IE. It looks for checkboxes named market, although I use market[$id] for each checkbox. Code:

View 4 Replies View Related

Showing/Hiding Now Working Correctly When Building Select List

Sep 15, 2009

I've built a tool where users can search for something & the results show up in a select list as selectable options..... sometimes the results can take a few seconds to load depending on how many results there are... so I was attempting to show some "Results are loading" text when they search, & then hide it when they are displayed.

However for some reason it's not working correctly.. both commands don't appear to work until the select list options have loaded & hence rendering them redundant.... I have tried putting them inside separate functions but no change in the behavior.

What basically happens is I press the button to search & it searches & once the results show up so does the loading text.... however if I include the hide text command then the text doesn't show at all as it's hidden as soon as it's shown.

Here is the code I am using..

function searchCats(text) {
// Set URL for ajax request
var url = 'search_cats.php?search_text='+text;
// Set up element we're modifying

[Code]....

View 6 Replies View Related







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