Working through our major redesign to mobile friendly to Google specs, but having problems getting the html contact form to send the info to our email. Is this possible? What am I doing wrong? Below is the code. Any help would be appreciated.
Your server is not going to be able to send an e-mail in this manner. You'll need to submit the form to a file with server-side programming to process the submission and communicate with your e-mail server. The "mailto:xxx@yyy.zzz" is only for anchoring, where it'll launch the default e-mail client for computer the user is on. In a form, it is meaningless.
There are numerous how-tos for setting this up, but in the end it requires server-side programming. Take a look at: Creating simple PHP contact form. It's a short and simple tutorial for a basic form->e-mail set-up.
Thanks, I had heard there was a way to do it in html, but most sites said exactly as you did. That it had to be in php. I'll fool around with the tutorial, maybe at a later date. Would have to change all links to a php file on that site, trying to get it up and running by Google Mobile Friendly date of today. Got several other sites to code; maybe I'll fool around with a php contact form in them.
I'm afraid not. The closest you get is following the route you already went and it pre-populates the e-mail (this requires the user to have an e-mail client installed, i.e. Outlook). You can find a working example of that at: Tryit Editor v2.5
The next closest would be an illusion of it being just HTML (using AJAX or a third-party form processor), but there would still have to be server-side set-up to process the form into the e-mail and send it.
I'm sorry it's not what you were hoping for, but that's simply how it is. SMTP/IMAP/POP3 processing all belong on the server-level. As such, there's no avoiding server-side programming for it.
Good luck with your conversion. Feel free to let us know if you have any problems. We love to troubleshoot.
Appreciate the advice. We completed that site redesign, but just went with the standard, here's our email, use it, method, without the form for now. Have a much bigger problem with a large site that includes a lot of tables and I'm really at a loss how to handle converting tables to a mobile-friendly format. I'm not a coder; just someone who does this for our sites in a self-taught, ask a lot of questions and hope to understand, method.
Tables are definitely one of the hardest things to convert to a mobile-friendly format. The key question to ask is: what is in the tables?
If they only contain data (as tables were meant to) and not used as a template structure, then there is little you can do except dictate how much of the table should appear on smaller screen sizes. Using media-queries or JavaScript can help you resize the tables and their content to reflect better on smaller screens, but it is usually a bad idea to resize the content (it still needs to be readable) which then causes issues with the resizing of everything else.
However, if you're using tables for templating (I still miss those glorious days), I recommend you switch to a div-based structure. They are significantly easier to manipulate for mobile-friendly development.
To save yourself the trouble of adapting a current template, I would've recommended building a new one in a mobile-friendly framework (such as Foundation or Bootstrap). Assuming you're not using static pages (.html) and instead using dynamic generation (.php and MySQL content storage), it likely would have been less time-consuming, though likely harder, to do.
I haven't started that site yet, and am not sure how to proceed. I was using html pages in the past, but the big problem is ... with Google's April 21 deadline (already passed) to be mobile compliant, to get table heavy pages (not for formatting, but for data) to be as you said readable and compliant seems almost impossible. I've looked at other table heavy sites in the same topic as us; they're not mobile either yet. I'm assuming same dilemma. Should we even bother with those pages.
I'm willing to move from the current template, but the info is not in a database and php (well, I've had trouble with it before) and MySql I've looked at but not used yet.
Not sure what we'll do; leave the table heavy pages relatively alone and be mobile compliant in a new template format for the others? But that doesn't look good.
For starters, those ads... I know, need to make money, but that's one of the reasons I avoid a lot of major websites, too many ads on a single page.
Anyways, for your table issue, if you haven't started on the site, I recommend just rebuilding it in a mobile-friendly framework. All the ones I've used have relatively good table support. However, a table is a table. In the end, there is just so much that can be done. My personal suggestion, were it my website, is to replace the table with just a list of the players linked to display the player details when on smaller screens. It keeps the display clean and doesn't require you to figure out a way to squish so much into a tiny space. Problem you'll run into is that you're content isn't dynamically generated. That's a nightmare for large quantities of data.
Basically, my recommendation is for you to take the time to rebuild the website in a CMS using a mobile-friendly (adaptive or responsive) template. It would be the easiest way to do the conversion without having to learn the niceties of PHP/MySQL integration and responsive styling. It may be a pain in the short term, but it should prove quite helpful in the future.
We're going to start out in a responsive template, but being mobile-friendly, as you said, for everything else, just doesn't make it that way for tables. And Google is penalizing for that, apparently.
We're trying to get cleaner with the ads on all our sites, but, ... hey, that's the hardest thing with publishing on the web, how to make money.
Have you ever seen this website that talks about making tables responsive? I just came across it in the last couple days. However, I can't seem to get it to work. Really don't know where to put the various codes. Does it seem feasible to you? Is it understandable to you? Realize I'm dim on this and just trying to learn before we start.
Thanks again for the back and forth. We're done the redesign on the first main site of ours and a couple others. May use one of those templates and start out on the baseball site next. First main site is listed below - so far it's working out okay.
Their responsive table is actually an old trick given new life. It's not uncommon to find massive tables where you want to keep the headers visible, even when you're are entry 3962 of 26276 (why you'd ever display those many entries on a single page is beyond my poor imagination [not really, just a lot of better ways to do such massive amounts of data]). To do this, it is common practice to make the header row "unique", likely by just adding a class or id to the TR tag. From there, you'd use JavaScript to duplicate the table, position it relative to the original, and hide everything exception the header row (notice I said "hide", not "remove"). This ensures the tables always match-up (they have identical content, even if the content of one isn't visible). Lastly, as you scroll down, the JavaScript detects when the header is at a y-position of less than or equal to 0 and alters it to a fixed position, making that header row always appear on top of the rest of the table.
The same concept can be applied to a column (which is what ZURB has there). It's a bit more difficult to do since you have a TD in every TR you'd have to identify, rather than one TR inside the TABLE. Their code was written so you don't have to so anything except add 2 (3 if you don't already use jQuery) files to you page and the class "responsive" to the tables you want responsive. It'll do all the work from there, converting the first column into a static one.
Here's a JSFiddle of your "Best Pitchers of All-Time" table with their responsive script added: Edit fiddle - JSFiddle
All I did was add jQuery and their 2 files to the header and the class "responsive" to the TABLE tag (I might've cleaned up the table alignment a bit, but nothing that could affect it). There really is nothing more to that script.
code in the right spot or added the corresponding files in the right location.
I'm sorry for being so dim. Where does the code above go? Where do the corresponding .js and .css files go. I've shoved them into the corresponding css and js folders, but the table still scrolls.
Geez, you've been so helpful, sorry for the additional questions.
I'm sorry for not replying sooner. The proper place to link files is in the HEAD tag. Make sure you have the path to the files relative to their location.
You don't need to worry about the "./" that I include, it's a legacy/*nix thing, but since the script would be under a sub-directory named "scripts" you need to tell it where to find that file.
Oh, boy, have to fool around with that and see if I can get it to work. No need to apologize about timing. You've been great. I lost a couple days when the responsive template I was using for this site was acting funny, even without the tables (would delete the middle column when reformatting to phone size), so I went back to a template for another site that worked well. I'm back up to that speed now.
I'm guessing that the css and js files, both the ones you noted here
responsive_tables.js and responsive_tables.css need to be put in the css and js folders, and there were other js and css files that zurb listed, guessing they should be put in those folders, too.???
I'm waiting on my server to populate the new substructure to the url, so I might not tackle the table pages for a day or so. Focusing on the non table pages till I get a clean subdomain structure to work in where they will be housed in the future.
It would be a good idea to put them with your other CSS and JS files, yes. If you directories are "css" and "js", then you should only have to substitute "styles" and "scripts" from my example (unless your directories are not immediate sub-directories of the parent containing the web page).
Well, I'm back, after a few days of coding the regular (non table) pages and getting the new url to propogate correctly. I'm attempting to do what you said, and, to some degree, it's working, but not totally.
It is responsive down to a point, say to tablet size, but not when you get down to cell phone level. Not sure why that is, or if it's even possible.
The page example that you were using is now located at
Does anything stick out to you in that that might clue me in to what's wrong?
In some ways, I'm not sure this is worth it or possible. I've been looking at the table heavy sports sites, the big guys of which we're not one, and they haven't even bothered yet to try and get their tables mobile friendly. Guess they're so big they're not worried about dropping in the rankings, or have already made an arrangement with Google not to drop them as they make the transition (if possible).
Looking at the website, it I'm getting a 404 error on the responsive-tables.js file. Verify the file is in your js directory. Secondly, the table has the class "img-responsive". If you're using styling from that class, great, but the JavaScript functions off the class "responsive". So, instead of using 'class="img-responsive"', use 'class="responsive img-responsive"'. This will allow functionality of the JavaScript to be used while applying your .img-responsive styling over anything applied by the .responsive styling.
Basically, any responsiveness you're seeing is based upon your styling, not the JavaScript.
Geez, you're brilliant! That did it. It created a scroll bar for the individual table when reducing it to high end mobile size. And that made it mobile friendly. Didn't expect that outcome, but it's great. Now on to coding a couple hundred pages in that format. Thanks again, DDAoN. Fantastic!!
JD
Now if I could only completely understand closing the /div. HAH!
I'm glad you were able to make it work and you're quite welcome for my assistance. If you issue has been satisfactorily resolved, please marked the topic as solved so other member can know that there is a resolution.
Would gladly do that, mark as solved, if I knew how. Can't find that. Of course, we kinda moved subject matters from one thing to the other, too? LOL. If you get the chance, show me how to mark it as solved, and I will.
Done. for future reference the thread tools are just above your first post.
Status
Not open for further replies.
You have insufficient privileges to reply here.
Related Threads
?
?
?
?
?
Tech Support Forum
4.7M posts
957.9K members
Since 2002
A forum community dedicated to tech experts and enthusiasts. Come join the discussion about articles, computer security, Mac, Microsoft, Linux, hardware, networking, gaming, reviews, accessories, and more!