|
I didn't write this, but have used it in the past:
Reset button:
Javascript function:
//****************************************************
// ResetValidators(validationSummaryId, validationControlsPrefix)
// Purpose: Resets ASP.NET validation control text display
// AND validation summary control display to empty.
// Inputs: validationSummaryID - string - id of ValidationSummary
// control
// validationControlsPrefix - string - a prefix to use
// to identify validation controls when looping through all
// span Ids. (Validation controls are represented by spans).
// Outputs: none
//****************************************************
function ResetValidators(validationSummaryId, validationControlsPrefix)
{
var spans;
var divValSummary;
if (document.all) {
spans = document.all.tags('span');
divValSummary = document.all(validationSummaryId);
}
else if (document.getElementsByTagName) {
spans = document.getElementsByTagName('span');
divValSummary = document.getElementsById(validationSummaryId);
}
if (spans) {
for (var i = 0; i < spans.length; i++) {
var prefixLength = "" + validationControlsPrefix.length;
var currID = "" + spans[i].id
if ((currID != '') && (prefixLength != '')) {
if (currID.substring(0,prefixLength) == validationControlsPrefix) {
//note - set visibility to hidden, not display=none.
// otherwise validator text will never show up again after reset.
spans[i].style.visibility='hidden';
}
}
}
}
if (divValSummary) {
// note set display=none, NOT visibility=hidden. Exact opposite of
// spans above!! Otherwise, validation summary is hidden permanently.
divValSummary.style.display='none';
}
}
|
|
|
|
|
Thanks a lot dear for ur Help. but my problem is still not solved. The code you given is used to reset the Validation Summary, not the whole form fields along with validators. Hope you understand what i am talking about.
Lets work it Out.........!
|
|
|
|
|
Are you talking about something as simple as:
|
|
|
|
|
Yeah something like this. But Please remember that Page should not Refresh.
Or there might be a loop in javascript which iterates for the whole form elements and reset them
Lets work it Out.........!
|
|
|
|
|
How about
function clearForm()
{
document.<your form="" name="">.reset();
}
|
|
|
|
|
I know you will be getting bore from this thread but I have tried "document.form1.reset()", It Reset Form Fields but it does not Reset the Validators Text against each field. Further more im facing some problems when i use it in FireFox.
Lets work it Out.........!
|
|
|
|
|
You can try something like the following. If it doesn't work completely, you can look at the page source, and locate the validators and find what tag they are being shown in, then add them to this script.
Hope this helps:
<!-- Hide Me
function rezForm(){
forma = window.document.forms[0];
if(forma){
for(b=0; b<forma.length; b++){
var myObj = forma[b];
if(myObj.type == "text" || myObj.type == "textarea" || myObj.type == "file" || myObj.type == "password"){
myObj.value = "";
}
else if (myObj.type.toString().charAt(0) == "s" && myObj.selectedIndex != 0){
myObj.selectedIndex = 0;
}
else if (myObj.type == "checkbox" || myObj.type == "radio" ){
myObj.checked = false;
}
}
for(d=0; d<forma.length; c++){
var daObj = forma[d];
if(daObj.type == "text" || daObj.type == "textarea" || daObj.type == "file"){
daObj.focus();
break;
}
else if (daObj.type.toString().charAt(0) == "s"){
daObj.focus();
break;
}
}
}
}
|
|
|
|
|
hi all ,
Is it possible to use fck editor with asp.net. if yes please send a small demo project used this editor.
mail: srinandan@infoface.com
thanks in advance.
regard,
srinandan
|
|
|
|
|
What is FCK Editor?
Best Regards
3ala2
|
|
|
|
|
|
even though I'm not familiar with the FCK Editor, you can use anything to edit the files (even notepad) if you like.
|
|
|
|
|
what do you think the fck editor is ??
its a tool for formation the text without writing html code.
then what the notbad have to do the web !!!!!!!!!!
Tamimi - Code
|
|
|
|
|
If you read my post, I said that I'm not familiar with it. I figured it was some kind of text editor. My statement was that you can basically use ANY text editor (e.g.: Notepad) to make ASP.NET pages.
You also may want to consider changing the "tone" of your responses. Don't expect everyone to know about all the tools you are using. You may want to take a more positive/informative tone.
|
|
|
|
|
so dont talk abiout someting you dont know it. the original post
was asking how to to use the fck editor in ASP.NET pages.
not how to create create ASP.NET pages.
dont post because you want to post !!!!!!!!!!!!!!111
Tamimi - Code
|
|
|
|
|
|
at least i know what iam talking about
Tamimi - Code
|
|
|
|
|
edboe wrote: If you read my post, I said that I'm not familiar with it
Yes indeed, but don't you think it would be better to find out what kind of editor he's talking about instead of posting suggestions? A google for "fckeditor" would have made you much more smarter. You can mislead the person asking the question with your comments.
edboe wrote: My statement was that you can basically use ANY text editor (e.g.: Notepad) to make ASP.NET pages.
See? That's what I mean. Indeed you can create pages using any editor, but that's not what he's talking about.
edboe wrote: You also may want to consider changing the "tone" of your responses.
Don't you think it's a good idea not to post if you don't know anything about the question?
regards,
Mircea
Many people spend their life going to sleep when they're not sleepy and walking up while they still are
|
|
|
|
|
Mircea Grelus wrote: would have made you much more smarter
Yes, one day I aspire to make profound statements like "much more smarter" like you.
|
|
|
|
|
Yes, I'm sorry I don't level up to your expectations. Shouldn't you be visiting a literature forum of some sort?
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
srinandan.. wrote: Is it possible to use fck editor with asp.net.
Yes it is.
srinandan.. wrote: if yes please send a small demo project used this editor.
mail: srinandan@infoface.com
Why do you think someone will bother to send you an application on your email, if you don't bother to check the forum to see if anyone has posted an answer to your question?
If you would have bothered to click the "Support" link on their website and then in the "Documentation" click the "Wiki Web Site" link you would have found the answer.
regards,
Mircea
Many people spend their life going to sleep when they're not sleepy and walking up while they still are
|
|
|
|
|
As a follow-up, I finally checked out the FCKEditor (I couldn't check at work because most sites are locked down, except for microsoft), and it's looks promising. I added the .NET component to the project and it worked fine, so your answer is yes, it works.
|
|
|
|
|
hi,
i want to accomplish the requirement that,on a page starting from left there will be text but at the right corner i want image .
Thge text will be entered by the user at run time.
Can i use the panel and text box but i'm unable to obtain reqired result .Pls suggest some proper solution.
thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
I barely have an idea what your problem seems to be .. but let me suggest something very simple and see..
Isn't it better to split the page up using a table and align each one appropriately? like this :
<table><br />
<br />
<tr><br />
<br />
<td align="Left"><br />
<br />
TEXTBOXES and other dynamic controls<br />
<br />
</td><br />
<br />
<td align="Right"><br />
<br />
IMAGES, etc..<br />
<br />
</td><br />
<br />
</tr><br />
<br />
</table>
This solution seems too easy. I have dont know if this is the solution you are looking for..
|
|
|
|
|
According to this, you can use the table structure to show the textbox for entering the text and image for display.
you can use the multiline textbox for getting the user input.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
Hi all ..I m working on Asp ..i have made a asp application ..which crate text file on Server..After that i want to give facility how to download that txt file on user system..
just like we download attached file from our mail.. to local disk..
Plzzz give me solutions ..
thanx in advance..
Life is not easy ,let's make it.
dcjoshi2
|
|
|
|