![]() |
| ||
| email, zipcode, and password confirm problem Brief overview, have three functions that return boolean for the zip code and email format and another to check if two fields are not empty and contain the same value. The wrapper functions I made that use another function to write to a div.innerHTML work fine. The function I made to check them all and then to call the 3 individual wrapper functions doesnt respond at all. FF Error Console reports nothing and IE does not alert anything either. I don't know what is wrong. If anyone can take a look at the code and tell me where I am doing something wrong or try to run it in your own browser? Any help is very much appreciated. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">I wish I that I would get an error or something, but this literally shows me nothing. Maybe someone here can identify where I went wrong with it. |
| ||
| Re: email, zipcode, and password confirm problem Ok, I think I typoed on the function testForm() { with )) |
| ||
| Re: email, zipcode, and password confirm problem No that has to be there, otherwise there is an error. Darn, I can't figure it out. Someone please help. |
| ||
| Re: email, zipcode, and password confirm problem Ok, the code I posted earlier was calling the wrong functions, but I fixed that, I even removed the if statement from testForm() This is what I am currently running but the effect is still the same for me, no response and no error. Its funny but the error console should have flagged the wrong function name in the earlier code, but I don't know what is going on here. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| ||
| Re: email, zipcode, and password confirm problem You have a < character in your script. You have to have a separate .js file when this happens. Otherwise, HTML parsing begins again at the < character. Also, anyone can read your code and find out the password. You must use server-side processing (not client-side) for passwords. |
| ||
| Re: email, zipcode, and password confirm problem Thanks for the lead, I am currently looking for that character in the script, and this is just the register new page, these functions will actually just check the form before posting to itself and it is in php. This was just a dummy page to check the functionality. I am still going to have php check things again as well as check for the username already in the database, among other things. Hopefully I can find the < char. Hopefully this will fix things and I can use the functions. I just didnt want the php to process it over and over again, and figured that having javascript precheck it would reduce the amount of times the server would possibly do it. Yeah I know that having javascript check the form and then php again is a bit redundant, but at least my server doesnt have to serve the page again and again over silly mistakes. |
| ||
| Re: email, zipcode, and password confirm problem Hmmm, I found the < char in the validEmail() function as checking to make sure that a period was not the last char in the string and again in a string in the writeTo() function that I use to write to the div and add a line break. I will try these in an external script. Maybe that will make them work. I'll post again after the test. |
| ||
| Re: email, zipcode, and password confirm problem Well, I tried first to change the validEmail() function and the writeTo() function without the < character and so I did. The problem still persist. The 3 buttons calling the individual wrapper functions work but the button that calls them one after another does not. I tried also putting the functions in the external .js and that did not work either. The code still works for the first three buttons meaning that the functions are working, but why would the testForm() not work. Im still lost. This is the working code with the <'s taken out. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">The wrapper functions use the wrtieTo() and now print out the br tags as text instead of the actual line breaks, and the functions still work although the text doesnt have line breaks, but what I can't figure out is why the testForm() still doesnt work. |
| ||
| Re: email, zipcode, and password confirm problem What I saw was in the function "writeTo". It doesn't matter if the character is inside quotes. |
| ||
| Re: email, zipcode, and password confirm problem Parameter passing does not work in the normal way when you use onclick or some other on- call. You can't put a parameter inside the function call parentheses in the way you do in javascript itself. |
| All times are GMT -4. The time now is 10:38 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC