473,698 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsl validation problem

14 New Member
hi this is rahul here

i am stucked in 1 problem........ ..

i have 2 input box and in my xsl file .1st will display the card no. of student and the second will display the amount in his balance field.this data i am retreving from my xml file.
now what i want is to edit the card no. and amount field but ,there is 1validation that if the student is changing its card no. then only the balance field should be enable otherwise disable .
that is if the card no is changed then only he should be able to change balance field.

what i am doing is retriving the original value cardno. in java script and check with the no entered in text box if the no is changed then the balance field is enabled.
and this method is called onkeyup event.

so please do let me know ur thoughts ............... ...
here is the sample code.........
(this is xsl file)


Expand|Select|Wrap|Line Numbers
  1. <table width="327" border="0" class="ordinary_text">
  2.                                   <tr>
  3.                                     <td width="64">Number : </td>
  4.                                     <td width="146">
  5.                                         <input type="text" name="cardno" size="23" maxlength="6" onkeyup="cardChangeValidation()">
  6.                                             <xsl:attribute name="value"><xsl:value-of select="@cardno"/></xsl:attribute>
  7.                                         </input>
  8.                                     </td>
  9.                                     <td width="95" rowspan="2">
  10.                                         <input type="submit" value="Change" onclick="document.all['myForm'+this.name.substring(4)].actionType.value='card';">
  11.                                             <xsl:attribute name="name">subC<xsl:value-of select="@childId"/></xsl:attribute>
  12.                                         </input>
  13.                                     </td>
  14.                                   </tr>
  15.                                   <tr>
  16.                                     <td>Balance : </td>
  17.                                     <td>
  18.                                         <input type="text" name="balance" size="23" disabled="disable">
  19.                                             <xsl:attribute name="value"><xsl:value-of select="@balance"/></xsl:attribute>
  20.                                         </input>
  21.                                     </td>
  22.                                   </tr>
  23.                                 </table>
  24.  
----------------------------------
cardChangeValid ation() method in javascript


Expand|Select|Wrap|Line Numbers
  1. function cardChangeValidation()
  2. {
  3.     var cardNo=document.forChangeCard].cardno.value;
  4.  
  5.     alert(cardNo)     ///i am not getting the card value here......i want the database value here so that i can compare with the the value enterd in text box
  6. }
Jun 6 '07 #1
12 2392
dorinbogdan
839 Recognized Expert Contributor
I will move the thread from Articles section to Forum section.
Please do not post in Articles section.

Thanks,
Dorin.
Jun 6 '07 #2
rahul gupta
14 New Member
sorry and thanks for posting it to forums
Jun 6 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Try to use id instead of name attribute for input textboxes:
<input type="text" id="cardno"... .
<input type="text" id="balance".. .

then in javascript update:
var cardNo=document .getElementById ("cardno").valu e;
Jun 6 '07 #4
rahul gupta
14 New Member
Try to use id instead of name attribute for input textboxes:
<input type="text" id="cardno"... .
<input type="text" id="balance".. .

then in javascript update:
var cardNo=document .getElementById ("cardno").valu e;

the code u have given is giving me the value.......... .thanks

but i am not getting the perfect data. i will tell more clearly........ .

in the student page left hand side i am displaying the data of 10 student.....
lastname first name cardno balance
r rr g 0005 56
ttt hhh 006 77
............... ............... ............... ............... ..
............... ............... ............... ............... ..

so when i will select one of the field from this then on the right hand side it will display cardno & balance textbox with the data 006 and 77.......
so the above code which u have given is giving me the value but for the 1 field that is 0005 & 56......
but i wnt the data which i have selected....... ..........


please tell me ............... ..
Jun 6 '07 #5
dorinbogdan
839 Recognized Expert Contributor
Please post the HTML result as it is currently, that is the source code behind the web page.
Jun 6 '07 #6
rahul gupta
14 New Member
Please post the HTML result as it is currently, that is the source code behind the web page.
----------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="AdminAcco unts.xsl"?><use r type="Admin" firstName="Admi n" lastName="User" >

<year y="" firstYear="" secondYear="">
</year>
<child cardno="000050" first="Aswin" last="Kumar" balance="0.0" childId="2">

<parent email="sdfwer@S DF.com" first="wewrwe" last="werew" lastlogin="null " parentId="5" prefLan="CZ" /></child><child cardno="000001" first="Anbu" last="Selvan" balance="0.0" childId="1">

<parent email="chenthil @gmail.com" first="Chenthil " last="Velan" lastlogin="2007-06-05 13:22:07.843" parentId="2" prefLan="CZ" /></child><child cardno="000003" first="Paruthi" last="Veeran" balance="0.0" childId="3">

</child><child cardno="000345" first="rrrr" last="gggg" balance="0.0" childId="6">

</child><child cardno="043534" first="ffff" last="gggg" balance="0.0" childId="9">

</child><child cardno="045645" first="oooo" last="pppp" balance="0.0" childId="11">

</child><child cardno="000004" first="asdf" last="qwer" balance="0.0" childId="4">

</child><child cardno="000676" first="gggg" last="rrrr" balance="0.0" childId="10">

</child><child cardno="000235" first="tttt" last="uuuu" balance="0.0" childId="7">

</child><child cardno="000016" first="qqqw" last="www" balance="0.0" childId="5">

</child><child cardno="035443" first="www" last="xxxx" balance="0.0" childId="8">

</child></user>
Jun 6 '07 #7
dorinbogdan
839 Recognized Expert Contributor
This is the XSL code, but I'd like to see the HTML output, as appears when right-click on page and "View page source".
Jun 6 '07 #8
rahul gupta
14 New Member
This is the XSL code, but I'd like to see the HTML output, as appears when right-click on page and "View page source".
---------------------------------------------------------
when i am clicking for the view source it is giving alert...
xml source file is unavilable for viewing......
Jun 6 '07 #9
rahul gupta
14 New Member
---------------------------------------------------------
when i am clicking for the view source it is giving alert...
xml source file is unavilable for viewing......



how can i attach file if i want to attach any............ .
.......
Jun 6 '07 #10

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

Similar topics

21
3910
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email adresses and so on. I thought it might be a better way to programm an automated, dynamic form validation that works for all kinds of fields, shows the necessary error messages and highlights the coresponding form fields.
41
2640
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What was really special about that site is that the validation service was available in Russian, German, Spanish and English. Now, I can't find this site anymore. I did search google. Do you know such site? What's its url? 2- Generally speaking, the...
3
2234
by: Kent Ogletree | last post by:
I am porting a Java XML Validation class over to C# and I am having a problem finding exactly what I need to acomplish the task. First I need to test for well formedness. I know this is usually something that does not need to be done, however in this case it is required. Is the best way to do this to validate to the schema and if no exception is thrown it must be well formed? What exception would be thrown if the document is found to not...
4
2369
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there any get arounds for this problem apart from the traditional JavaScript?
4
10145
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all the validators. The user enters the data, presses OK. My OK button is dynamically generated as well, with some code-behind logic in
3
2824
by: john morales | last post by:
Hi guys, I have a problem and i know there must be a solution for this as it is such a basic common practice in asp.net development. Scenario: i have many webforms in a site, most with two different custom controls, one is a login module, the other is a generic data entry module. When there are no validation controls on the page there is no problem. But when the the data entry module has validation controls, the login module triggers...
5
3241
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and I use an argument to difference between an 'edit' vs. and 'add. But since I have field validation on both 'footer' and 'edit' columns I can't submit my edits since the footer validation kicks in.If I take the validation off then the both work fine...
4
2971
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are linkbuttons which must not cause validation. I have found a setting "causeValidation" to disable the validation. Also on the page, I have a datagrid that I will edit lines on. I can click
9
3181
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected... So the behavour is similar to a tab control. The user is expected to fill out required data on each of the panels before pressing a submit button which is visible from all panels. Problem I have is validating the data entered by the user. I...
2
4509
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation. I discovered that there was no aspnet_client folder in the root of my IIS Web site, and when I ran "aspnet_regiis -c", client-side validation was working again. However, what I don't understand is why the required field validator did not...
0
8672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9021
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4361
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.