|
I got following scenario:
User control placed on default.aspx page, in my user control i got a text box and "Submit" button is on my user control.
Now i need to add the validat my text box (which is in user control) when user clicks "Submit" button then i should show error message. I need to do my validation on client side
I tried it by adding an attribut to my button like this :
BtnSave.Attributes.Add("onclick", "if (!ValidateSecActionType()) return false; ");
then i wrote this code in codefront page :
function ValidateSecActionType()
{
if(document.getElementById('txtSecActionTypeTitle').innerText == "1" )
{
document.getElementById('AlertLbl').style.visibility = 'visible' ;
return false;
}
return true;
}
now when i run my page i have an error like this :
Object Required
how can i do this ?????????????
thanks alot....
|
|
|
|
|
Could you share some more information about the error message, like when and where it occurs, and what code line it refers to?
I don't know if this is the cause of the error, but:
The innerText property is only available in Internet Explorer, and probably only in quirks mode. Use innerHTML instead.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
go to view source, and check whether the, 'txtSecActionTypeTitle' is same or it is comming with some prefixfollowed with and underscore.
eg:
'ctl00_txtSecActionTypeTitle'
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
hi,
This is rajendran,working as a web developer and am developing one multimedia project.and I want to know how read & write the swf file from database(SQL Server)..
Plz reply me..Thanks
Rajendran
|
|
|
|
|
Great, you have posted this on almost all forums. Have you went down to this forum and checked a similar post exist there or not ? Click [^]
|
|
|
|
|
hi,
Really Good work.I solved that problem....thanks alot
Rajendran
|
|
|
|
|
Hi ,
Navaneeth Can we see an images from the table(database)...If u know plz reply me...
thanks..
Rajendran
|
|
|
|
|
hi friends
How to delete or clear the data grid value in asp.net,At the time of post Back
|
|
|
|
|
DataGrid1.DataSource = null;
DataGrid1.DataBind();
|
|
|
|
|
frnd ur code hide the data, not deleting ,if i refresh the form again the old data also displaying.
|
|
|
|
|
What do you want to do ? Be more specific with question, show some sample code, how it will display again ?
|
|
|
|
|
I am having a string in format(KSERVER/Name)...Now i want only the Name,How can i split?....I dont want to use Substring method.
Thanks in Advance...
|
|
|
|
|
Split it with / , you will get a string array. From that you can take name easily
|
|
|
|
|
Dim arr() As String
Dim n As Int16
Dim str As String = "KSERVER/Name"
arr = Split(str, "/") 'using / split the sring
For n = 0 To UBound(arr)
MessageBox.Show(arr(n))
Next
i think this code will help u.
by srinivasan.s
|
|
|
|
|
Dim arr() As String
Dim n As Int16
Dim str As String = "KSERVER/Name"
arr = Split(str, "/") 'using / split the sring
For n = 0 To UBound(arr)
MessageBox.Show(arr(n))
Next
try this code....
Rajendran
|
|
|
|
|
Kasi Viswanathan wrote: I dont want to use Substring method.
Why not? That's the most efficient way of getting a part of a string.
Use the IndexOf method to get the location of the "/" character, then use Substring to get the part of the string after that:
string name = path.Substring(path.IndexOf('/') + 1);
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Tanx for ur reply...
|
|
|
|
|
My Requirement is to create a web application in which a TAB Control is placed in it.
In each tab same controls are to be placed. for this i created a webuser control and accessed the same in each tab.
I have placed some controls like radiobutton list, textboxes, dropdowns fro selection criteria in the web user control.
I have created a class and wrote some properties , serialize and deserialize methods to store the values selected from each tab and save to a disk file.
The question is that in one tab whatever i have selected and saved to the file it is coming in all tabs. I dont want this to happen.
it must come in one tab only, as i want to save different selection for different tabs.
So How can i do this?
Please help me out if u have any solutions by which this prob can be solved.
chandra
|
|
|
|
|
Hi I have declared static arraylist and its contained operations In Select Case (Url)...,
Now I like to display those based on table records...,
Plz any one help me how to fill that table records in this code...,
My Asp.Net code
Sub MenusLoad()
Dim _Text As ArrayList = New ArrayList
'Here From That Table MainDesc Have to Fill
_Text.Add("Admin")
_Text.Add("Gen.Master")
Dim ts As JQD.TabStrip = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
'Here Based on that MainDesc, Link_Title Have to Fill
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
_Text.Add("User Rights-Group")
_Text.Add("User Rights-IND")
_SubTabText.Add(0, _Text)
_Text = New ArrayList
_Text.Add("Company")
_SubTabText.Add(1, _Text)
' Like This i am loding subtabs on here...,
ts.SubTabTextCol = _SubTabText
AddHandler ts.SelectionChanged, AddressOf Me.ts_SelectionChanged
End Sub
'Here based on that subtabs i am loding my url...,
Private Sub ts_SelectionChanged(ByVal sender As Object, ByVal e As JQD.TabStrip.SelectionChangedEventArgs)
Dim TabPos As Integer = e.TabPosition
Dim SubPos As Integer = e.SubTabPosition
Select Case (TabPos)
'Here Based On that MainDesc And Link_Title, Link_URL Have to Fill
Case 0
If (SubPos = 0) Then
src = "frmuserrights.aspx"
End If
If (SubPos = 1) Then
src = "frmAuthentication.aspx"
End If
Case 1
If (SubPos = 0) Then
src = "frmCompanyMasterDetails.aspx"
End If
End Select
Session("src") = src
End Sub
My Table:
SELECT dbo.tblAdminAuthenticationsub.userid, dbo.tblMainTab.MainId, dbo.tblMainTab.MainDesc,
dbo.tblAdminPageurl.Pageno, dbo.tblAdminPageurl.Link_Title, dbo.tblAdminPageurl.Link_URL
FROM dbo.tblAdminAuthenticationsub INNER JOIN dbo.tblAdminPageurl ON
dbo.tblAdminAuthenticationsub.pageno = dbo.tblAdminPageurl.Pageno INNER JOIN dbo.tblMainTab ON
dbo.tblAdminPageurl.MainId = dbo.tblMainTab.MainId WHERE dbo.tblAdminAuthenticationsub.userid = 10010053
order by dbo.tblMainTab.MainId
UserId MaiId MainDesc PageNo Link_Title Link_Url
10010053 1 Admin 102 Page Accumulation frmpageaccumulation.aspx
10010053 1 Admin 103 User Rights Old frmAuthentication.aspx
10010053 2 Gen.Master 152 Bank details of Company frmBankMasterForCompany.aspx
10010053 2 Gen.Master 153 Bank details of clients frmBankMasterForWorkOrder.aspx
10010053 3 HR 129 Activity Card frmtimecardmain.aspx
-- modified at 8:28 Monday 29th October, 2007
Regards,
Magi
|
|
|
|
|
Magh_M wrote: Re: Plz Help Me...,
Hey, you have posted more than 300 messages, and still don't you know how to name a question ? Make your question smaller by removing unwanted code, point the things that you need clarification. I don't think that without all these you will get a reply
|
|
|
|
|
Hi I have reduced my quest as small...
And I dont know more than this how to reduce it...,
If i reduce then no one cant whats the probs,
If my quest make u to anger sorry for that...,
Regards,
Magi
|
|
|
|
|
give small description of your problem. no one going to read this long code .
|
|
|
|
|
I am using a dropdownlist. DropDownList Enter the value in Design Time
(Add New).
My event in
dropdownlist_SelectedIndexChanged(---------)
{
if(dropdownlist.selectedindex == 0)
{
---------------
}
But Write this code not fired event()
|
|
|
|
|
Check property of dropdownlist that autopostback is true or not.
Devjit Das
|
|
|
|
|
Yes, AutoPostBack Property already True
|
|
|
|