473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

compare the two consecutive rows in table - HTML

i want to compare the two consecutive rows in the table such that if
the first row contains handset in the category column and the next row contins simcard in category column it will alert the user, a alert promt for example.

but if the sequnce is simcard then handset, a different alert will show,..


thanks...
Jun 7 '07 #1
9 4425
r035198x
13,262 8TB
i want to compare the two consecutive rows in the table such that if
the first row contains handset in the category column and the next row contins simcard in category column it will alert the user, a alert promt for example.

but if the sequnce is simcard then handset, a different alert will show,..


thanks...
Moved to Javascript forum .
Jun 7 '07 #2
i want to compare the two consecutive rows in the table such that if
the first row contains handset in the category column and the next row contins simcard in category column it will alert the user, a alert promt for example.

but if the sequnce is simcard then handset, a different alert will show,..


thanks...
Jun 8 '07 #3
acoder
16,027 Expert Mod 8TB
Show the HTML markup.
Jun 8 '07 #4
Show the HTML markup.
can you give me an example.

thanks.,.. :)
Jun 8 '07 #5
acoder
16,027 Expert Mod 8TB
Merged threads. I assume rochelle27 and rochelle28 are one and the same.
Jun 8 '07 #6
acoder
16,027 Expert Mod 8TB
can you give me an example.

thanks.,.. :)
You must have a table, otherwise you can't ask about an alert depending on different rows.

For example, you have:
[HTML]<table ...>
<tr><td>content</td></tr>
<tr><td>some more content</td></tr>
</table>[/HTML]
You'll possibly have ids too.
Jun 8 '07 #7
You must have a table, otherwise you can't ask about an alert depending on different rows.

For example, you have:
[HTML]<table ...>
<tr><td>content</td></tr>
<tr><td>some more content</td></tr>
</table>[/HTML]
You'll possibly have ids too.

yes i have a table, but how will i compare the value of first <td>
to the next <td>
i have a textfield and an ADD button which populates the record in the table
my goal is to get the previous value and store it a variable...
Jun 8 '07 #8
acoder
16,027 Expert Mod 8TB
See this example to get an idea.

If you get stuck, post your code.
Jun 9 '07 #9
See this example to get an idea.

If you get stuck, post your code.

<form name="crmForm" method="post">
<input type="button" name="btnAdd" value="Add" onclick="AddRowMode()">

<input type="text" name="hdnCategoryCode" maxlength="20">


</form>


<script language="JavaScript">


AddRowMode(){

var varCurrentRow = document.crmForm.hdnCategoryCode;


if

if (varCurrentRow =="SIM") {

....

}else (varCurrentRow =="HANDSET"){
...

}
...
codes for appending in the table here.....


}

here are some of my codes,.

i already append the values in the tables, and everytime i add rows to the table I managed also to store the category in the hidden textfield called hdnCategoryCode, so i will no longer use the rows to compare. But now the problem is like this, when i click my add button the value of hdnCategoryCode and hdnPreviousValue are the same, i just want a script to store the previous value of the hdnCategoryCode to a variable, that will be retained even if i clicked the add button again the second time around..then then I can now compare the it with the current value of hdnCategoryCode.

thank you very much for time....
it was highly appreciated :-)
Jun 11 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
2
by: codejockey | last post by:
I have a simple project that requires I take a set of data from an Excel spreadsheet, compare it to a table in SQL Server (where column names match), and if there are changes in the Excel sheet,...
0
by: codejockey | last post by:
Please forgive the repost, but I'm trying to avoid the hack I want to implement since I cant get this sample to work. Can anyone help? *********************** William: Thanks for the reply. I...
9
by: VMI | last post by:
I have two tables and I want to compare these two tables with a query( ie. "select * from A where B.key = A.key") and the result will be stored in a 3rd table (table C). is this possible? If...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
0
by: varac | last post by:
Hi list, I am new to mysql and would appreciate any advice that you have to offer. I am attempting to batch insert 100 rows into a table, and I need to know the 100 id's of all the inserted...
11
by: inpuarg | last post by:
I have 2 datatables. They are identical. I want to compare them by cell's content. They are all same. But dt1 == dt2 or dt1.GetHashCode() == dt2.GetHashCode() doesn 't work. There are big...
6
by: plumba | last post by:
I have a table in a HTML form which has multiple rows, each row contains a user ID (too many to list on this forum).. The form has an input field at the top which the user types in a user ID, I want...
1
by: Mike | last post by:
Hi All, I'm using vb.net as my codebehind lang. and the following code is being executed in my aspx.vb page to stamp a DB row. Dim oStatsInfo As New StatsInfo(CartID, Batch, Set, Num, 0, 0, 0,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.