Publish Your Own Wildly Successful and Profitable Newsletter Without Writing One Single Word Yourself & Become A Recognized Expert In The Internet Marketing Field Almost Effortlessly Get it now!
One way of doing this is, with the html: Sign up for the newsletter Submit And the JavaScript: var emailEntry = document. GetElementById('emailAddress'); var button = document. GetElementById('submitButton'); var defaultButtonText = button.
InnerHTML; emailEntry. Onblur = function(){ var val = this. Value; // the following IS NOT a valid test of email address validity // it's for demo purposes ONLY if (val.
Length Color = 'red'; } else { button. InnerHTML = defaultButtonText; button.style. Color = 'black'; } }; button.
Onclick = function(){ // prevent submission of the form if the email was found invalid // and the innerHTML was therefore set to 'retry' if (this. InnerHTML == 'retry'){ return false; } }; JS Fiddle demo.
Try this instead: function validate() { if($("#buttonDiv").html()== 'Retry') { // oops! They are trying to get back to where they were by // re-clicking retry. Let's reset this thing reset() return false; } var emDiv = document.
GetElementById('email') // only look up once. If(emDiv) { // the space after the . Should allow for 6 long var reg = /^(A-Za-z0-9_\-\.)+\@(A-Za-z0-9_\-\.
)+\.(A-Za-z{2,6})$/; var address = emDiv. Value; // good form issue -- never use == false. Use!
If(!reg. Test(address)) { emDiv. Value = 'Address entered not valid'; emDiv.style.
Color = '#bf4343'; emDiv.style. FontSize = '12px'; $("#buttonDiv"). Html( 'Retry' ); return false; } } }.
So it appears as if this takes advantage of the reset JS I setup. I think something may be wrong with the way I wrote it though. When I try to run it on it's own, it doesn't perform the intended result :(.
– Josh Aug 30 at 22:33.
If so, you can try the jQuery version of it since you have jQuery loaded anyway =) The following is for your reset() function which changes text color to red: $('#email'). Val(''). Css('color', '#FF0000').
Css('font-size', '18px'); The following is for your blur() function which changes text color to black. Attach this to your email input text box as well and you should be set: $('#email').blur(). Css('color', '#000000').
You can then use this same concept on all the elements that you have to reset. I would recommend using classes instead of doing this though. It would be easier to manage and maintain.
– Allen Liu Aug 30 at 22:05 Well I originally was trying to make reset change the style of the email ID, but I was running into weird issues. I decided to declare these styles within the onFocus. I can remove the commenting and update it to the method you suggested.
– Josh Aug 30 at 22:35 Ok so I updated the reset script and I changed the onFocus to run reset(). Now I lost the functionality of the text changing back from red to black. I'm sure I'm either calling it wrong or I did something incorrect when declaring the reset function.Itsmontoya.Com/work/playdeadcult/indextest.
Php is the live link for these changes :) – Josh Aug 30 at 22:40 You are currently using reset() for the onfocus() event which is currently changing the text to black => #000. If you want the text to be red, you can simply change it to #FF0000 (red). If the text is black by default or onblur, then you would have to attach the black font there.
– Allen Liu Aug 300 at 16:53.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.