Jump to content

businessman332211@hotmail.com

Members
  • Posts

    304
  • Joined

  • Last visited

Posts posted by businessman332211@hotmail.com

  1. I am having a few problems and some help on these would not only help me solve this problem but allow me to take a step forward in programming. First of all I have set up all php processing and validation already, now what i need to do, is set it up to where it validates with Javascript. I am planning 2 forms of validation, with the functions in an external stylesheet and called into the form areas using events. I was going to do this via 2 events, based on a recommendation from "The Java Script Bible Version 5". This is the book I have been learning, and referencing from since it's one of the best on the market. Mailman broke my photoshop cd(sorry just venting). Back on track there are 2 things I need help with.1.First of all I need to figure out what the current problem is with my current set of code. Ok, below is a cut of my form.Below that you will find the related function added to the external js file, You will not need to reverify it's connection the the said page, as I am 100% sure the page is connected right I have other functions already running from it.

    <form name="ideasandsubmissionsform" action="../cgi-bin/form-processors/ideasandsubmissionsprocessor.php" method="post"><fieldset class="formstyle"><legend>Ideas and Submissions</legend><br /><label for="firstname" accesskey="f">*First Name:</label><br /><input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" onchange="check_f_name return false;" /><br /><label for="emailaddress" accesskey="e">*Email Address:</label><br /><input tabindex="2" name="emailaddress" id="emailaddress" type="text" maxlength="80" /><br /><label for="verifyemail" accesskey="v">*Verify Email:</label><br /><input tabindex="3" name="verifyemail" id="verifyemail" type="text" maxlegth="80" /><br /><label for="description" accesskey="m">*Description:</label><br /><textarea tabindex="4" name="description" id="description" rows="6" cols="30"></textarea><br /><input tabindex="5" name="submit" id="submit" type="submit" value="submit" /><input tabindex="6" name="reset" id="reset" type="reset" value="reset" /></fieldset></form>

    function check_f_name() {if (isempty(document.ideasandsubmissionsform.getelementbyid("firstname"))){document.alert('You have not filled out the Firstname Field');}

    Now the expected action with this is to go by the following idea.I wanted it to check whether the value exists(meaning whether it's filled in or not) using the isempty() in javascript. I was advised in javascript to do an onchange, and onsubmit command for each one, to give peolpe ahead of time to change it as they go, I cannot get it to work properly.2.The other question I had was, I want to get both so would I put inonchange="whatever" onsubmit="whatever" on every single end of every single input for it to register, or will those cause conflicts with each other, thanks.

  2. SOLVED, I changed the code around a bit and it worked fine, thanksI played with it some, this is how my php code looks now

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>ideasandsubmissionsprocessor.php</title></head><body><?phpif ($_POST['firstname'] == ""){print("You have not correctly filled out the First name.  Please hit back and fix the errors");}if ($_POST['emailaddress'] == ""){print("You have not correctly filled in the first name.  Please hit back and fix the errors");}if ($_POST['verifyemail'] == ""){print("You have not correctly filled in the verify email field.  Please hit back and fix the errors");}if ($_POST['description'] == ""){print("You have not correctly filled int he verify email field.  Please hit the back and fix the errors");}?><?php$firstname = $_POST['firstname'];$emailaddress = $_POST['emailaddress'];$verifyemail = $_POST['verifyemail'];$description = $_POST['description'];$to = "businessman332211@hotmail.com";$subject = "ideas and submissions";$message = "First Name: $firstnameEmail Address: $emailaddressVerify Email: $verifyemailDescription: $description";if(mail($to, $subject, $message)) {print("Thank you for submitting your email has been successfully sent");print("<br />Return to the homepage at <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>");}else{print("I am sorry but there was some sort of error and the email could not be sent");print("<br />I am not totally sure of the cause of this error.");print("<br />Please return to <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>");print("<br />If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman.");}?></body></html>

    now it is checking it right, and validating it right, but it also sends the email even if the fields fail, I don't understand how to get it to work through the process correctly, I will keep playing with it, maybe I can figure out something, but any help would be greatly appreciated.

  3. I am having a problem now, I moved on to validation.I have my form

    <form name="ideasandsubmissionsform" action="../cgi-bin/form-processors/ideasandsubmissionsprocessor.php" method="post"><fieldset class="formstyle"><legend>Ideas and Submissions</legend><br /><label for="firstname" accesskey="f">*First Name:</label><br /><input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" value="<?php echo $_POST["firstname"]; ?>" /><br /><label for="emailaddress" accesskey="e">*Email Address:</label><br /><input tabindex="2" name="emailaddress" id="emailaddress" type="text" maxlength="80" value="<?php echo $_POST["emailaddress"]; ?>" /><br /><label for="verifyemail" accesskey="v">*Verify Email:</label><br /><input tabindex="3" name="verifyemail" id="verifyemail" type="text" maxlegth="80" /><br /><label for="description" accesskey="m">*Description:</label><br /><textarea tabindex="4" name="description" id="description" rows="6" cols="30"></textarea><br /><input tabindex="5" name="submit" id="submit" type="submit" value="submit" /><input tabindex="6" name="reset" id="reset" type="reset" value="reset" /></fieldset></form>

    I am wondering because I get this error

    Parse error: parse error, unexpected T_ISSET, expecting '(' in /home/freelan4/public_html/cgi-bin/form-processors/ideasandsubmissionsprocessor.php on line 9
    here is my php code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>ideasandsubmissionsprocessor.php</title></head><body><?phpif isset($_POST['firstname'] == ""){print("You have not correctly filled out the First name.  Please hit back and fix the errors");}if isset($_POST['emailaddress'] == ""){print("You have not correctly filled in the first name.  Please hit back and fix the errors");}if isset($_POST['verifyemail'] == ""){print("You have not correctly filled in the verify email field.  Please hit back and fix the errors");}if isset($_POST['description'] == ""){print("You have not correctly filled int he verify email field.  Please hit the back and fix the errors");}?><?php$firstname = $_POST['firstname'];$emailaddress = $_POST['emailaddress'];$verifyemail = $_POST['verifyemail'];$description = $_POST['description'];$to = "businessman332211@hotmail.com";$subject = "ideas and submissions";$message = "First Name: $firstnameEmail Address: $emailaddressVerify Email: $verifyemailDescription: $description";if(mail($to, $subject, $message)) {print("Thank you for submitting your email has been successfully sent");print("<br />Return to the homepage at <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>");}else{print("I am sorry but there was some sort of error and the email could not be sent");print("<br />I am not totally sure of the cause of this error.");print("<br />Please return to <a href='http://www.freelancebusinessman.com'>Freelance Businessman</a>");print("<br />If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman.");}?></body></html>

    I haven't really started putting in the advanced validation using c-type yet, but when i put something basic like this, what I am trying to do is test all fields to make sure they have atleast something in them, then I was going to put more functions to check for other things. But right now just checking for validation, when I added that in above my email functions and everything it started to give me an error. Any advice, thanks.

  4. SOLVED- I had 2 problems wrong with it, I had double quotes, so I had to change those to single quotes inside hte mail function, and the second thing, is I didn't close the php controller before hte mail function, so it all works now, thanks for looking and thinking.It is coming up with

    Parse error: parse error, unexpected T_IF in /home/freelan4/public_html/cgi-bin/form-processors/ideasandsubmissionsprocessor.php on line 22
    Below is the php processor code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>ideasandsubmissionsprocessor.php</title></head><body><?php$firstname = $_POST['firstname'];$emailaddress = $_POST['emailaddress'];$verifyemail = $_POST['verifyemail'];$description = $_POST['description'];$to = "businessman332211@hotmail.com";$subject = "ideas and submissions";$message = "First Name: $firstnameEmail Address: $emailaddressVerify Email: $verifyemailDescription: $description"if (mail($to, $subject, $message)){print("Thank you for submitting your email has been successfully sent");print("Return to the homepage at <a href="http://www.freelancebusinessman.com">Freelance Businessman</a>");}else{print("I am sorry but there was some sort of error and the email could not be sent");print("I am not totally sure of the cause of this error.");print("Please return to <a href="http://www.freelancebusinessman.com">Freelance Businessman</a>");print("If you try again and recieve this error message a second time, then please email me at the original email address and notify me of this error, so it can be checked into.  Thank you for visiting Freelance Businessman.");}?></body></html>

    Now below here is the page with the form

    <form name="ideasandsubmissionsform" action="../cgi-bin/form-processors/ideasandsubmissionsprocessor.php" method="post"><fieldset class="formstyle"><legend>Ideas and Submissions</legend><br /><label for="firstname" accesskey="f">*First Name:</label><br /><input tabindex="1" name="firstname" id="firstname" type="text" maxlength="30" /><br /><label for="emailaddress" accesskey="e">*Email Address:</label><br /><input tabindex="2" name="emailaddress" id="emailaddress" type="text" maxlength="80" /><br /><label for="verifyemail" accesskey="v">*Verify Email:</label><br /><input tabindex="3" name="verifyemail" id="verifyemail" type="text" maxlegth="80" /><br /><label for="description" accesskey="m">*Description:</label><br /><textarea tabindex="4" name="description" id="description" rows="6" cols="30"></textarea><br /><input tabindex="5" name="submit" id="submit" type="submit" value="submit" /><input tabindex="6" name="reset" id="reset" type="reset" value="reset" /></fieldset></form>

    Any ideas, when I first started on it, it gave me other errors, and I hunted down the problems in the script that I messed up on, but now everything looks to be in place, any ideas.

  5. I am playing around with it, and experimenting with it some, and I might have it on the same page, I know the javascript validation will be easier.

  6. a lot of that makes sense, but I definitely like having the processor in an external page, I know it can be populater like that I just have to figure out how.

  7. well sort of if you mean that repopulation. For instance someone fills out a form, it gets validated through javascript and php, at both time the form refreshes normally clearing the data, I would rather have the data stay in the form, so they don't have to lose the data and retype it all everytime they make a mistake. I don't know if it's possible to have the proper checkbox fields repopulate, but I know the text can be reentered.

  8. Not really, as I am totally un familiar with teh checkboxes and radio buttons, I need to find out the theories behind how they are validated. But the main thing is whether I should validate the php on the same page as the form, or on the same page as the processor. And yes I do need to figure out how to repopulate the form fields as well, because I have no clue where to start with it.Thanks

  9. I am a little confused on what you mean by some of that, can you reexplain some of it, I am thinking that you mean, sometimes you don't want the values to say something the first time, but you do the second time, so you can do this, I don't understand.

  10. hmm, I will keep these ideas in mind, I am creating ideas for my website, I am about to go professional, and need all the things in place, thanks again for all the advice, anything else would be appreciated relating to this topic thanks again.

  11. look for advice/guidance/direction, on 2 subject.WHen I create a form I always validate it first with javascript very carefully. Then I validate it with php and then process it with php. Is it better for me to process it in php on the same page as the form, or on the same page as the processor. have like all the functions for validations first, and then the processor below that.The other thing I really needed help with,was what is the best way to get a form to repopulate itself. for instance if someone presses submit it normally refreshes, either by javascript or php when it validates to show the messages. I want it to repopulate all the values with what they already had in, I have a decent idea on how to do the text fields, but I can use a refresher, I am totally lost when it comes to check boxes, radio buttons and things like that, all the advice I can get will be greatly appreciated.

  12. What are the purposes of hidden form fields, I know XHTML, CSS, PHP, SQL, Java Script, what are hidden form fields going to be useful for. for instance if it has to do with processing the form, I always call each variable, and afterwards I mail them, so I wouldn't have a need for a hidden field that gives the email address and subject. What other purposes would they be useful for. I have been looking around online for there purpose, and can't find anything that is helpful. Thanks again for the help.

  13. I fear drop down menu's I use those with css instead, I did implement some netscape 4 bug fixer, unknowlingly to what the purpose, I don't think netscape 4 would have a resize issue:S

  14. FireFox seems to be handling it correctly while IE is not. Play witht he margin
    margin:0.5em;

    see if it makes a differencetry adding this after the above line

    margin-left:0px;padding-left:0px;

    finally got it, what's wierd, is when I did it fast, coded it fast, it was all correct, validated excetera, the browser misread it, I HAD to specify left:0, the bottom:whatever, then reposition left after that to the way I wanted when I wentmargin-left:0.6em;margin-bottom:0.5em;it didn't read it right, when I did margin-left:0em;margin-bottom:0.5em;it registered that then picked it up as I repositioned it, very strange.
  15. the only place I see you setting padding is here
    #mainnav ol{list-style-type:none;padding:auto;}

    Where do you need the padding??? Do you have a link to the example page...it would be much easier to solve if we could actualy see what you mean.

    It wasn't padding before that. I used the other selectors, it's auto because that is what I was trying then, www.freelancebusinessman.com I need it to simply remove the padding from the left, and allow me to set it, all the other browsers, keep ignoring my padding rules.
  16. none of them but ie are displaying it right, it's like there ignoring my paddings all together. It's starting to get me angry, I am about to smash the monitor. Just got out of one fix, into another one.#mainnav {width: 200px;background-color:#666666;margin:0.5em;border-color:#333333;border-style:double;float:left;}#mainnav h3{font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;text-align:center;}#mainnav ol{list-style-type:none;padding:auto;}#mainnav a:link{color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;}#mainnav a:visited{color:#000066;}#mainnav a:hover{color:#999999;text-decoration:none;font-weight:bold;}#mainnav a:active{}

  17. Most browsers are reading the padding for my lists www.freelancebusinessman.comI am confused, you can see my stylesheet there, I am confused I specify margin-left:0px, 0em, meaning I tried them both, some browsers are reading it some are not, and the problem is, I want them all to have a little space from the left wall, on all the browsers, I have never had it ignore or misread my padding styles for lists before.

  18. There is something I am trying to do. I want my site to be liquid design, once I finish the homepage the rest will be very easy to keep liquid, as with this specific site I am copying and pasting the layout, and reusing it. Here is the thing my css skills have tripled in the past week, I am almost able to create liquid design. I have rebuilt my homepage 4 times, until now I can do it from scratch by myself in almost any way I want with no help. I want to now achieve full 100% liquid design, and still keep the browser compatibility. I have tested it in internet explorer, firefox, opera, netscape, and safari(using a safari tester), It looks good in all of the newest versions of those, and is good in the older browsers except some of the hover colors don't work. Right now I want to redo it, but I don't necessarily want to rebuild as I am ready to start taking on projects soon, so I want to achieve 100% liquid design, can anyone look at my stylesheet and tell me how I can go from that to liquid design, and keep it looking the same, also I want it like w3, where when you change the text size it works, right now if you change text size in the browser, it goes haywire, and shoots my divs all over the place, and kicks the text all out of the divs, looks like crap. If I have to start from scratch I am up for the challenge, but I am wanting to reconvert what I have to liquid, partially because If I have a client, that has a website, I can offer them liquid design, and possibly get an extra job changing there stuff over to liquid design, any advice would be greatly appreciated.

  19. perfect I redid the code, removed the hacks, and it worked in all of them, then I noticed what you said and it fixed the top problem, thank's alot, I appreciate it. Last thing is I am trying to get the padding in the navigation to work right, I don't want it centered, but it's not padding it right in all the browsers, but I am working with that now, thanks for the help.

  20. For some reason my site is still not working in opera, I did a severe code overhaul, and learnt all the workings behind hte code off the advice of someone, it lessened my code, used less code to get the same affect, and removed an ie hack, while still allowing it to work properly in ie. What I am trying to figure out now, is why it still doesn't work in operawww.freelancebusinessman.comWhat is happening now, is it is keeping that space above the logo, and the main content is over the logo, I need to figure out what is causing this, any advice, my stylesheet is over there, but if you see something a little wierd when you look I am still playing around with it a bit, trying to figure it out.

  21. Also I was thinking about that, but I was suggested on multiple encounters to don't get into a habit of that, or it will require a lot of maintenance, but instead leave it as a last resort, when it's for a client, and there's a strict deadline.

  22. I had a question here but it's hard to explain, by default my main board is phpfreaks. But I am starting to like this one, there is more help here for css/javascript users, than anywhere I have ever seen. Here is my problem but it's hard to explain, So I am going to put down each section of conversation in quotes to give you an idea of why I am askign what I am asking.the website is www.freelancebusinessman.com and originally I was using a hack to fix a problem with internet explorer, but it never worked in opera correctly. I tried it on firefox, netscape. Now what I did was have someone help me, I used his code, and it used a lot less code to get something done. I don't understand what he did to make it less and still work right. The other thing is my code was different and what you see in my stylesheet now, what I had in those sections was replaced in the section.

    I have finally broken through from using Absolute and Relative positioning. I dislike wrapping my websites with #wrapper divs. So I came up with other solutions, I encountered a massive problem, a misalignment issue between internet explorer and firefox, I fixed this*Please note the homepage is still under construction, I am still working with link coloring and some other issues.But what I did was implemented a hack, that removed the margin problem in ie, and it looked good in firefox, but there is a major error in opera. I can't get it to get off the logo, no matter what, that is my problemwww.freelancebusinessman.comYou can see my css, and Xhtml code there, everything should validate too, I have been playing with them some, but nothing should have thrown off validation. The last issue I am having is with opera, and I would like to get rid of that hack too if I could but I couldn't find any other solutions.EDITAlso is there any way for me to change around the way I am doing this. I will even redesign the whole thing from scratch, if there is a better way for me to set up this layout, right now as it is, as the content expands the bottom nav bar moves down, as it's supposed to, but I also have incorporated that hack in the css file to fix that, and I am still having the issue severely in opera, the issue comes from margin, on the logo or top of that div, but when I fix it, it severely messes up. The other thing I am trying to figure out, is it possible to create something that looks good in all the browsers I am using being Firefox, internet explorer, netscape, opera- and still have it look good in safari(which I can't see) without using css hacks. Or programming to correct errors, I want to use programming, but not to situate layout I have heard it's bad. I just want to get good at this, I know php, sql, and javascript I will get good at, as I use them, but those are useless to me, unless I am a master of css. I am alread a master almost of Xhtml, but the css, I am still working on and in the past 3 days I have learnt 200 fold from what I previously knew, and I knew a lot then. So I am doing a lot better, getting some of these issues situated will help, I know alot of the stuff I am asking here is subject to opinion, so I am seeking opinions, but anything that can be backed up with proof on accessibility, or standards compliant, would be a push I need to start working in that direction, I want to be 100% hand coded(programming, excetera except when using third party scripts in php), standards compliant, and do as much as possible to keep the code, easy to read, easy to understand, and well commented. If it's possible I would like to do any type of layout, or anything without ever using hacks, and I dug very deep into liquid design I tried my hardest to get liquid design, and I thought I had it until the design was laid out, any advice, or proof, on somethings I can do(if) I redesign my site, to make it 100% liquid I would love it, because when I Finish the homepage completely that's it, I just copy and past the html code, and then redo the content area, and fill it with the new content, I am having the same page layout for every single page, so the homepage is the most critical page on there, sorry for all the writing, but I was hoping to shed some light into the reasoning for me asking these questions, and these number of questions. Thanks for any help, greatly appreciated.MAJOR QUESTION-SHould I follow w3 standards when using selectors or do them my wayw3p#maincontent{}h3#maincontent{}p.maincontent{}h3.maincontent{}ExceteraMY personal preference#maincontent p{}#maincontent h3{}.maincontent p{}.maincontent h3{}Which way is better, the way w3 shows, or my way, if it's w3, then I will go through and change all of it now, and start mastering that way as well.again sorry for all the questions but I really need this help, I am trying my hardest to advance my career, even if I have to redesign 50 times.THanks.
    does anyone have any ideas on this opera problem, if I can't find out any other way except to take and use php to detect the browser, and use a different stylesheet for opera, there has to be some other way
    You seem to have crap loads of CSS hacks. This is not needed at all.Remove any hacks form your CSS. Now apply the following CSS to your #maincontent stye, basically repolace what ever you have for that style with the following:CODE#maincontent {float: left;width:640px; border-style:double; border-color:#333333;text-indent:1.2em;margin: 0.5em 0 0.5em 0.5em;padding: 0.5em;}Now float your menu (#mainnav) to the left, or just change the CSS to this:CODE#mainnav {width: 200px;background-color: #666666;margin: 0.5em;border-color:#333333;border-style: double;float: left;}By now you should see that Opera, IE and FF are displaying your site correctly! Now for a small finsihing toch to make your site appear centered on screen is to change the body style to the following:CODEbody {background-color:#7A97A5;width: 900px;margin: 0px auto; /* Allows the site to be centered on the screen, rather than being stuck to left of the window */}Your site should be cross browser compatible Opera, FF, IE (6 and 7) and hopefully others such as safari) with no CSS hacks insight!
    The thing that confuses me, I thought I was only using one hack, I hadn't intentionally tried to use any other hacks, that is what confused me.
    Alot of css hacks?? I am confused, I thought I only had one hack in there, the one to fix internet explorer, but monday when I start to work again, I will look at your code, and apply it to my site, then dissect it to find out what you did to make it work. I have learnt 100 times what I new before In just the past 3 days, doing what you said, when I encounter a problem I run through bunches of websites, looking at there css file. I will remove that hack, but I am pretty sure, that I only have one hack in there.
    Below is a copy of all the questions I actually wanted to ask here, because I know I won't get an answer at the other place.
    Ok, I looked over your stuff wildteen today. I was looking over this, and I changed everything but I didn't want to without understanding it, again I am trying to master css. I understand now what you showed me about the body, what I had was the body was set with margin's and padding earlier, now I see you set the body with a width, and margin and that centered it, to tell you the truth I was unaware that you could set a width for the body. But I see it's set and looks exactly the same with less code, the question about that which is technically better, setting the margin and padding of the body, or setting the width of it, then adjusting the position.Another thing I didn't understand what happened with the main navigation and the content area. I floated one left, into another one, and did a few other things.What I don't get fully is the way what I had, changed to what you had and still worked. I redid it the way you said, I don't fully understand it enough to be able to do it the same way next time I build a layout, so if you have time could you explain that too me as much as you can, so I understand better. You also dropped a couple of my border styles and somehow my border still turned out the same.And how on earth didmargin: 0px auto; /* Allows the site to be centered on the screen, rather than being stuck to left of the window */set my entire body to be in the center, I prefer doing it this way so I redid that part to look likebody {background-color:#7A97A5;width: 900px;margin-top: 0px;margin:auto; /* Allows the site to be centered on the screen, rather than being stuck to left of the window */}and what I don't get is, the margin-top I know removed the margin at the top. The auto, I am confused about, as soon as I set margin auto for the rest, it centered it, how does that happen. Does that mean by default when the left and right margins are auto then they set it into the center.Sorry for all the questions, but any help would be greatly appreciated.And the only thing, is it still doesn't work in opera, it doesn't even close the area between the logo, and the top. Is there a way to fix it in opera, thanks for all the help so far I greatly appreciate it.
    Well the bottom one is a list of the questions I need help on, I apologize for the long post, but I had no choice to get the general idea down of what was going on, or the questions would have made absolutely no sense, and the way I am, a lot of my posts will be huge, thanks for the help, to anyone that is able to answer any of those questions in the last quotes.
×
×
  • Create New...