Locating Specific INPUT Tag Within A TD Tag With No Id And No Name?
Nov 10, 2009
We have a commercial shopping cart software installed on our website and since it is proprietary, we do not have access to source code. But they do allow you to include custom javascript on the web pages that they generate. What I want to do is add some text after a specifc INPUT tag that appears on the page within a TD tag. The problem is, that they do not have any specifc ID assigned to the INPUT or TD tag, and although the INPUT tag has a name assigned to it, the name is used in other tags as well and is not unique.
Below is the code that I used to solve the problem, but I want to know if there is a more efficient way to do it... Basically my code grabs every TD tag on the page, and then loops thru all of them looking for the specifc INPUT tag characteristics and then inserts the text afterwards (it needs to work in both Firefox and IE so you cannot use innerHTML).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
[code]....
View 3 Replies
ADVERTISEMENT
Aug 19, 2011
I am trying to set up a menu like the one that is located here. [URL] If you look on the right side of the page you will see menu's like gifts under $50 and so on. When these are clicked on it opens several links under them. Where can I find a script like this?
View 5 Replies
View Related
Aug 18, 2010
[URL]
I would like to utilize this script where I could pass the string of words to another page.
Meaning, search for the text, actually a word, then take the two words following the searched text and have them passed to the next page...I have tried to "alert" the words, but have no success.
I have tried to modify the code using the following, but the result just posts a "-1" in my alert popup.
As you can see I modified the code from the original thread in the third block of "for" code. also, I added an "alert" tag. One more thing, I added a function call for the form button.
The code is below:
<script type="text/javascript">
var count = 0;
var itemList = new Array();
var oldText = "";
[Code]....
View 4 Replies
View Related
May 17, 2011
sending some new input data with ajax
$('input[type=stufff2]').change(function() {
var allInputs = $(":input");
alert( allInputs.color );
[code]....
View 2 Replies
View Related
Oct 11, 2006
I created this test routine to return the form containing a certain
input element:
function GetElementForm(element)
{
// Return the form that contains element.
varmyElement = element;
while (myElement)
{
myElement = myElement.parentNode;
if (myElement)
{
var sTagName = myElement.tagName;
if (sTagName)
{
if (sTagName.toLowerCase() == "form")
{
break;
}}}}
return myElement;}
This seems to work for "well formed" HTML, but fails for example, when
a form is defined within a table.
View 2 Replies
View Related
Feb 23, 2010
I'm trying to update the input field that ends in the word 'label', but not update the one that ends in 'label' and has 'choice' in the name. (really just looking for line 9 to work).
<html><head>
<script src="jsjquery-1.3.2.min.js" language="javascript" id="javascript"></script>
<script>
$(function(){
$(':input[name$=label]').val('111');
$(':input[name*=choices]').val('222');
$(':input[name$=label]').find(':input[name*=choices]').val('333');
$(':input[name$=label]').find(':not:input[name*=choices]').val('444');
});
</script></head><body>
<input name="section[x].fr[y].label" value="" />
<input name="section[x].fr[y].choices[z].label" value="" />
</body></html>
View 1 Replies
View Related
Nov 5, 2009
Within a classic asp webform (using vbscript) I would like part of the form (input boxes within table structure) to be specific/displayed depending on the users selection from the combo box in the row above.
I think the best solution would be using Javascript can anyone suggest a solution or example code?
View 1 Replies
View Related
Sep 22, 2010
I am not new to jQuery but I just want to ask the best way to approach this. Basically I have a textfield in which the user is going to type in a number (for example 20) and after this textfield lose focus jQuery will be triggered to create whatever number of textfields the user put before (in this case 20).
So, to illustrate: How many users do you have: [ 2 ](and after the field above lose focus, the below will be generated)
Fullname: [ ]
Fullname: [ ]
View 2 Replies
View Related
Oct 22, 2009
I need to get the filename, basename, dirname using jQuery. if there is any utility that will take care of windows/mac/linux file paths.
View 1 Replies
View Related
Mar 10, 2010
<div class="box top"></div>
<div class="box main">
<div class="box header">
<div class="badge"><ul><li class="active"><span>60</span></li></ul></div>
[Code]....
What is happening is $(this) is no longer based on .expand being the (this) that is clicked.
like if i have a button SOMEWHERE randomly on the page with this
<div onclick="Minimize('_alerts');">Click Here</div> this will minimize alerts but because the (this) in minimize function doesn't actually point to the right button that I want to add a class to.
Is there a way to modify the minimize function so that it finds the <div id="mytoggle"><ul> <li class="expand boxminimize" rel="_alerts"> using the rel toggle, and then changes the class of the li from expand boxminimize to boxexpanded??
just like the .expand click function I posted on the top of the post that works?
View 1 Replies
View Related
Oct 6, 2009
Another thing that has been driving me crazy is that css positioning is handled differently by different browsers. JS is not my area, but I can do a lot with CSS, and I do, but cross browser compatibility is killing me.
I can use an IF IE statement and only IE runs that segment of code, but I haven't been able to figure out out how to make ONLY firefox or ONLY opera or safari enact an encapsulated segment of code. The same type of IF statement doesn't work for them.
Is there a single method using JS that works for all browsers?
View 8 Replies
View Related
Apr 19, 2010
I know this code works just fine:
function result(){
var result = document.getElementById('resss').innerHTML;
}
But what I actually want is to import data from a table of an external website. E.g. I want to get the innerHTML of a specific cell in column 3 and row 2 of a specific site.
View 1 Replies
View Related
Jun 7, 2010
I am having a form with two input fields. I want to enter some text in the first input field and then the second field should get the same text. Is there a simple way (maybe a plugin) to do this with jQuery? It would be perfect if I even could output all these input fields values as normal text in <p> or <li> tags.
View 2 Replies
View Related
Mar 16, 2011
As recently as 1.4.3 $('input:text') would find input elements with no type attribute, but after upgrading to 1.5.1 that is no longer the case.
Is this a bug or an intended refactor to be more standards compliant?
FYI - this is the selector I now have to use: $('input:text,input:not([type])')
View 4 Replies
View Related
Nov 20, 2011
Jqtransform Firefox Input Problem Basic problem is the text inside of the form input is lower than it should be.
View 2 Replies
View Related
Sep 7, 2009
I have a pretty basic set of things I want to do: Capture key press, compare against an allowed list, block keys that are not in that list, replace a space by a dash if entered. As this is happening, I have a span I wanted to be updated with the live values. The username field at [URL] is exactly what I am trying to do, though I have trouble dissecting how they did it. Here is my attempt, which is off by one keypress for some reason.
[Code]..
View 2 Replies
View Related
Jan 26, 2011
I have 2 windows - parent and children.
in parent
<form name="calc" action="" method="post">
<input value="0" type="text" name="pay" id="pay">
</form>
in child
<form name="payment" action="" method="post">
<input value="0" type="text" name="pay_str" id="pay_str">
</form>
how can i transfer data from parent input to child input?
View 3 Replies
View Related
Jun 17, 2009
I have a form and there are many form fields, is anyone know how to make one of my input text only for display purpose, not for input.
View 5 Replies
View Related
Jun 15, 2011
I am trying to create a text area input filed for user input, and i want to be able to allow the user to format thier text, just like the ones used in this user forum. I am writing my website in html, php, javascript and css with a MySql database. I am trying to understand how to create such an format-able text area for input.
View 1 Replies
View Related
Oct 29, 2010
I've got a form in which the fields are being dynamically generated based upon a db query.. it looks something like this:
Code:
<form name="bft">
<input name="colA_1"> <input name="colB_1" onBlur="loadXMLDoc(this.value,'colC_1');"><input name="colC_1">
[code]...
I'm trying to use AJaX to populate the third input in the same row as the second input based upon a separate db query. Here's the code for that:
Code:
<script type="text/javascript">
function loadXMLDoc(v,n) {
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
[code]...
Here's where it displays on the page<cfoutput>#trim(getITRRSP.[columnName])#</cfoutput>
Whenever the focus blurs from those inputs, the third column in that row is populated with "UNKNOWN" as the value. I have confirmed that the getITRRSP.cfm file is properly retrieving and displaying the data from the db query.
View 1 Replies
View Related
Jul 23, 2005
I have an array of input text boxes (txtDOBn) where n is created at
load. On the onchange event I want to calc the age and show in adjacent
input text boxes that are readonly and also arrays (an age calced for
each DOB entered). I was going to use the datediff function in vbscript
to do the calc. Code:
View 12 Replies
View Related
Feb 15, 2011
Is it possible to copy the value of a visible input field to a hidden input field?
View 1 Replies
View Related
May 11, 2009
Why when i compare input value with array, he match only the first input.
This is my code:
View 1 Replies
View Related
May 26, 2011
I cannot determine how to make an input required only on the conditional value of another input. My unsuccessful code snippet is (as a rules item):
where aboutOthers is a textarea required if the value of Others is > 0. Does this simple task require something more? I can not find any simple rules condition syntax anywhere I have looked.
View 2 Replies
View Related
Jan 28, 2007
When you click the form, the whole text in the input is highlighted, and the text there was also copied.
View 2 Replies
View Related
May 23, 2011
I wanna ask about scan card. Is there any way to disallow keyboard input and only allow scan card input to key in a field? FYI, I am using vbscript, html and javascript for this program. So, may be doing something with the javascript? How about limit the time of input? I really have no idea.
View 5 Replies
View Related