Jump to content

phpQuestioner

Members
  • Posts

    1,485
  • Joined

  • Last visited

    Never

Everything posted by phpQuestioner

  1. Is Spry Tabs the same thing a Tab Content Box; I assume it is. If you are not wanting the end user to interact with your database using these "Spry Tabs"; then AJAX really would not be needed. You could just use basic DHTML. Here is an example that I made you; check it out and see if it is what you are looking for. <style type="text/css"> #tabcontent DIV {width:100px;height:100px;border:solid 1px black;display:none} </style> <script language="javascript"> var TotalTabs = "12"; // amount of tab contents (in your case; this would be "12" for 12 months) var BaseContentID = "contentTab"; // base content tabs id; excludes unique number to differentiate between different tabs (see html below for further understanding) var CurrentMonth="02"; // echo out the php month here where the static "02" currently is at - ie: <?php $currentmonth = date('m'); echo "$currentmonth"; ?> function showMonth() { switch(CurrentMonth) { case "01": document.getElementById(BaseContentID+1).style.display="block" break; case "02": document.getElementById(BaseContentID+2).style.display="block" break; case "03": document.getElementById(BaseContentID+3).style.display="block" break; case "04": document.getElementById(BaseContentID+4).style.display="block" break; case "05": document.getElementById(BaseContentID+5).style.display="block" break; case "06": document.getElementById(BaseContentID+6).style.display="block" break; case "07": document.getElementById(BaseContentID+7).style.display="block" break; case "08": document.getElementById(BaseContentID+.style.display="block" break; case "09": document.getElementById(BaseContentID+9).style.display="block" break; case "10": document.getElementById(BaseContentID+10).style.display="block" break; case "11": document.getElementById(BaseContentID+11).style.display="block" break; case "12": document.getElementById(BaseContentID+12).style.display="block" break; } } window.onload=function() { showMonth(); } </script> </head> <body> <div id="tabcontent"> <div id="contentTab1"> January </div> <div id="contentTab2"> February </div> <div id="contentTab3"> March </div> <div id="contentTab4"> April </div> <div id="contentTab5"> May </div> <div id="contentTab6"> June </div> <div id="contentTab7"> July </div> <div id="contentTab8"> August </div> <div id="contentTab9"> September </div> <div id="contentTab10"> October </div> <div id="contentTab11"> November </div> <div id="contentTab12"> December </div> </div> Hope this is what your looking for - good luck
  2. You would create a PHP page to do all this and then you would have your PHP page to echo out whatever you wanted to be returned to your responseText (the content that you want to display with AJAX in your page); if the member login and password is correct. Google "AJAX User Login" and you should be able to see some examples of how to do this. - Good Luck
  3. Sorry; Moneytree - My fault; rename you second function - like have a verify() and a verify2() function. See if that corrects the issue; I think it should, but if it does not - try renaming you error1, error2, and error3 variables in the second function - in the verify2() function - you could change them to something like error1a, error2a, and error3a - but I don't think you will have to do that. try this <script language="javascript"> var errors1 = ""; var errors2 = ""; var errors3 = ""; var message="Please complete the following field(s): \n"; function verify() { var first = document.myform.realname.value; var last = document.myform.lastname.value; var email = document.myform.email.value; if (first.length == "0") { errors1="First name\n"; } if (last.length == "0") { errors2="Last name\n"; } if (email.length == "0") { errors3="email address\n"; } if (errors1.length >= "1" || errors2.length >= "1" || errors3.length >= "1") { alert(message + "\n\n" + errors1 + errors2 + errors3); } else { document.myform.submit(); } } function verify2() { var first2 = document.mysecondform.realname2.value; var last2 = document.mysecondform.lastname2.value; var emailtwo = document.mysecondform.email2.value; if (first2.length == "0") { errors1="First name\n"; } if (last2.length == "0") { errors2="Last name\n"; } if (emailtwo.length == "0") { errors3="email address\n"; } if (errors1.length >= "1" || errors2.length >= "1" || errors3.length >= "1") { alert(message + "\n\n" + errors1 + errors2 + errors3); } else { document.myform2.submit(); } } </script>
  4. ha ha - did you look at the source code? - Trying turning off javascript. And remember, this is a public school district website, so it should be 100% accessible. Whether the site was designed to be only functional with JavaScript or is a completely different topic; we were discussing table layout vs. css div layouts - remember? ??? Also; you understand what your taking about is a Vetical DHMTL Menu - right? DHTML is a combination of CSS and JavaScript; so JavaScript has to be enabled for users to view that menu. I am assuming that the designer understands that the vast majority of internet users today; have JavaScript enabled on their browsers, but again this is a totally different topic then what we were previously discussing. You think I'm stupid or something? I know it's dhtml and that more than 80% of users have javascript enabled, but the fact that its a school site, a public school site, deems it necessary for it to be 100% accessible. Even if <noscript></noscript> have to be used - which they aren't. And my original reason for posting the link to that site shows what of a mess a table layout creates. Yes, it is up to the web developer to choose whether or not he will use css. It is also up to the developer to choose if he wants to be smart and efficient or if he wants to be a fool and use tables. I'm done argueing, I might as well use my time for something wiser. Well I didn't call you stupid; but your references to that issue; sure didn't impress me. You have a right to your opinion; but as I stated only one page of your supposed example of how designing with table is so awful, could be used to prove your point and I think a large amount of that issue steamed from poor CSS layout/structural coding. Although your point is fruitless to me; that's your opinion. People will continue to choose their layouts as the deem fit and neither you or me will influence them either way. The point of this huge post was to prove the point of "personal preference" and I think I have done just that and if you don't like that; well guess what - that's just to bad for you.
  5. ha ha - did you look at the source code? - Trying turning off javascript. And remember, this is a public school district website, so it should be 100% accessible. Whether the site was designed to be only functional with JavaScript or is a completely different topic; we were discussing table layout vs. css div layouts - remember? ??? Also; you understand what your taking about is a Vetical DHMTL Menu - right? DHTML is a combination of CSS and JavaScript; so JavaScript has to be enabled for users to view that menu. I am assuming that the designer understands that the vast majority of internet users today; have JavaScript enabled on their browsers, but again this is a totally different topic then what we were previously discussing.
  6. I think there is an article on Adobe about this issue and I cannot not view the issue for myself; I don't have Mac - I am a PC guy.
  7. Issue 1.) Your not using the <form></form> tags around the form that is in your drop box advertisement. 2.) You cannot have two forms with the same name and same field names and expect the javascript to submit them both. Solution: 1.) Make sure you wrap the drop box advertisement form with the proper form tags. 2.) Give your drop box advertisement form another name; such as "mysecondform" and then I would give my form field a different name to; such as: realname2, lastname2, and email2 (this will help you and the JavaScripts interaction with the browser avoid confusion). Then add this JavaScript with the previous script that I already wrote for you. function verify() { var first2 = document.mysecondform.realname2.value; var last2 = document.mysecondform.lastname2.value; var emailtwo = document.mysecondform.email2.value; var errors1 = ""; var errors2 = ""; var errors3 = ""; var message="Please complete the following field(s): \n"; if (first2.length == "0") { errors1="First name\n"; } if (last2.length == "0") { errors2="Last name\n"; } if (emailtwo.length == "0") { errors3="email address\n"; } if (errors1.length >= "1" || errors2.length >= "1" || errors3.length >= "1") { alert(message + "\n\n" + errors1 + errors2 + errors3); } else { document.myform2.submit(); } } Also; you really should not demand that users join a opt-in-list, because allot of people don't want to be required to do so; too continue viewing your website - you know what I mean.
  8. Also, TheFilmGod; the only page of the site that really looks bad to me is the "Home" page. The rest of the site's pages looks ok; granted I have only viewed them in FF, but all-in-all; they look ok.
  9. There is no such thing as winning an internet argument. No one ever changes their opinion - it just gives those reading different points to think about. If you have two tables on two pages, they are hard coded into the page. They have to download on each page. If you re-visit a page, sure the table is cached. But if you visit a different page, the tables on that page download with the html on that page. Not with layout, you are right. But its a point for CSS. Tis true, I can't argue with that one. If you are using external templates for your tables, then its essentially the same thing. If your structure if valid, conditional comments are few. Hacks should never be used. Tables on the other hand render differently across browsers and need to have sizes and styles etc applied to them - essentially what you are doing with CSS. Got any examples of this? Can't say I've ever seen it, but I have to admit that just because I've never seen it doesn't mean it doesn't exist. Finally, some points that you didn't get into: CSS being better for accessibility, and for precision of layout. Any thoughts on these? Now did I cover all you opinions? You will not win this argument with me; it just ain't going to happen guy. Sorry - I am the debating king and I don't give up! (I can say it too) Of course there is a winner and you believe so too or you wouldn't keep reposting your comments to this thread. The layout is most likely going to be the same on ever page; atleast the structures of it; so it will be cached. Your point about link style was invalid; that was not the topic of this debate; it was css layouts verses table layouts. Tables are the same across browsers; the may vary slightly, but css will vary dramatically sometimes, depending on the extent of the layout diversity. Don't have an example of hand of images loading before all the css; but I have seen it happen - can't prove it - but I now it does happen. Actually I called your a "wanna be" css guru - lol. Not my faught; it's the designers fault - the same thing could happen with CSS layouts; if their not coded accurately. Anyway, it looks like bad CSS styling; the tables may be layout wrong, but someone did a horrible job coding the CSS. Sounds like the developer knew what he was doing; if he is making $300,000 to update and maintain the site - wish I had site like that - lol. And for the final time I am not saying one is better then the other; I still think it is personal preference due to current application of said layout. But since you wanted to make it a debate; I just took table layouts to argue for and let you have css layouts.
  10. Why don't you try this and see how it works out for you: <form action='index.php' method='post' name='submitForm' id='submitForm'> <select name='campaign' id='campaign' onchange="document.submitForm.submit();"> <option value='1'>1</option> <option value='2'>2</option> </select> </form>
  11. Northern Flame you are my new best friend on here. Thanks for your support - between this guy and bronzemonkey; I don't know which one thinks they are the biggest css guru on here - I really think they should have a show down - old western style - too see which one wins biggest css guru "wanna be" - I think they both might lose that one - lol.
  12. ok - let make break your theories/opinions down in points - lol 1.) More Power To You And Them - I Already Said You Could Follow That To A "T" - That It Didn't Matter To Me If You Did Or Not. 2.) You don't thinks that tables cache - are you for real - do you not think they had caches in browser back in the hay day of tables. 3.) DIV with Classes & IDs are no easier to find then <table> <tr> <td>; your still looking for the content that is with in them right? 4.) Styling an <a> element has nothing to do with layout design. 5.) CSS Stylesheets Just Creates A Template For Your Layout; If You Design You Site's Layout with Tables; You Done The Exact Same Thing; You Created A Template. 6.) Actually tables are pretty much cross browser compatible; where a good bit of css is not. Either it does not work the same way and you have to hack your way around it with even more css or it just does not work at all. 7.) So does a table - I already addressed this above too. No they do not have to download each time; they cache just like css does and sometimes if you wait X amount of minutes; css has to reload just like anything else does - I have seen it happen many times before. The actual page loads first and the css is applied sometimes after images load; because it's takes up more memory, hence longer load times, hence stylesheets my stall when loading. Now did I cover all you opinions? You will not win this argument with me; it just ain't going to happen guy. Sorry - I am the debating king and I don't give up!
  13. You are so still missing the point; I never said they are better (it is you that says CSS is so much better and that is your opinion - I like to use both, as I already have said), I said it's a matter of personal preference and where are you getting your facts from - what did you do speed test tables versions of layouts verses css div versions of layout? And if so; on multiple browsers @ different internet speeds? You cannot prove to me that CSS has faster load time then tables; you cannot prove that. As far as easier to read code; that has nothing to do with layout design itself. As far as easier to update; you should be doing that dynamically if the web page has to be constantly updated. It is not really less code for same design; you have to make up the less html coding; with the more daunting task of making your css display accurately in every browser and that adds weight to your stylesheet. Plus you have to wait for your css to load your page structure; as where if you already had tables in place; guess what - you already got structure and your page does not look all funky at first. This just covers a few of your pros to css; that could be considered cons to others. I am not trying to get you to change your mind; that is not my goal. What I am telling you is that if someone so desires to use tables, instead of divs, too design the layouts; then that is "A Freak N OK". And you can build a fully dynamic site with tables if you choose to.
  14. Although the grammar was a little wrong here, I think I get what you were saying. I never said people can't use tables (in fact quite the opposite). I just said that its not a good way to. Although, depending on your examples, I may have to change my opinion on that. Guy, you decide what you want to use - I believe TheFilmGod already gave you one good example and I don't have to give you any examples; but there are some css properties that can be used to display layouts that are not supported in every browser and you know this if you are the big css guy you say and act like you are and that is where tables come in; plus there easier to code for and supported by all browsers. I use CSS and have been doing so since I first began designing websites many years ago; but I choose layouts according to situations where I think they are appropriate. And I will continue to do so; as I said until tables are depreciated. And you don't worry about my grammar; I convey the point as need - ummm kaaaaa. (how's that for grammar - lol).
  15. Well that is pretty close to saying it's wrong. Web standards are fine and dandy; there is nothing wrong with them and you can follow them to a "T" - doesn't bother me either way; but just because someone tells you not to do something; do you listen to them aways or do you make your own mind up. That is the whole point of this discussion, personal preference. Until browsers stop using old school basic html elements and I seriously doubt that is going to happen any time soon; there is no reason why one person can use divs for layout and the other person use tables for layouts; they both have pros and cons to using them. I personally use a combination of both; depending on what I want to do. This is the problem with people who are all about CSS; there not well rounded enough designer to realize that there other options out there - become more diverse.
  16. The javascript is not really going to be a problem for you about getting your current bookings (it just displays them); but you will need to store your daily booking in a database and then retrieve the schedule with AJAX and JavaScript (like something similar or the same as nogray's). That is how you are going to have to do this.
  17. The only issue with that is that all of your input fields will then be in bold; buttons included - as your previously stated. That is why I gave the textarea's id a specific font-weight style. It is probably better to style an id or class for this one; instead of creating more specific classes and ids for the non-bold input fields - you know what I mean.
  18. I did not state you were wrong; I just said it was a personal preference for different applications of web design. It is true that a large majority of people use CSS, no one is arguing with you there; but to say it is wrong to use tables - well that is just wrong. You can use tables for pretty much anything; if you so desire to - again personal preference for application/layout design.
  19. This may help you see how to add options to a select menu: http://javascript.internet.com/forms/adding-options.html If not; Google something like "adding select menu options with javascript"; that should return you several examples of adding options to a select menu. You also may want to Google "JavaScript Chained Select Menus". Hope This Helps
  20. Oh - my mistake; are you wanting a chained select menu?
  21. Do you have content in the flash movie? Is your application type correct? You should not be having this issue if the object and the embed is setup correctly.
  22. Here is a basic demo; it's got an error (which there is a odd number of select menus) which I am still working on, but it does work. If you will give me a little bit; I will figure out the error and correct it. <select> <option></option> <option>One</option> <option>Two</option> </select> <select> <option></option> <option>One</option> <option>Two</option> </select> <select> <option></option> <option>One</option> <option>Two</option> </select> <select> <option></option> <option>One</option> <option>Two</option> </select> <select> <option></option> <option>One</option> <option>Two</option> </select> <select> <option></option> <option>One</option> <option>Two</option> </select> <script language="javascript"> var max = document.getElementsByTagName('option').length; for(i=0;i<max;i++) { if (i%2) { i=i+2; document.getElementsByTagName('option')[i].selected = true; } else { i=i+1; document.getElementsByTagName('option')[i].selected = true; } } </script>
  23. Not at all. As far as SEO is concerned, tables rank lower. As far as speed of loading is concerned, tables take longer, and have to download more data more often. And as far as separation of content and design, tables cannot compare. Tables also are bad for accessibility - screen readers for the blind do not work well with them at all. Finally, elements can be positioned much more precisely and fluidly with CSS, an example being a site that works on a 3-column layout for wide screen monitors, and two column layout for narrower screen monitors. That is impossible with tables. Tables are the way of the past. You have a right to your opinion; but it doesn't necessary mean it's true for every application. As I stated before; it's a personal preference - CSS is not the end all, be all of layout design - it's just there to style your "elements from the past" - as you describe them.
  24. Is it just 3 select menus or could it be multiple select menus? I need to know; to cater to the js code I am going to write for you. Also; will it always be 2 options only?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.