taaron12 Posted September 17, 2009 Share Posted September 17, 2009 Hi guys! I've been working on my website here and there, lately. I'm doing fairly well with html, and have started to get the hang of CSS, to where I can get it to work after a few attempts of trial and error. (Darn syntaxes being off by one letter! Always threw me off in my web design class. )Anyhow, I've got my initial layout down, and my front page down, I'm ready to move on the content pages. Or so I thought. I took my layout with the Menu and Search/Google Adsense already put into it, and I've found the Search/Google Adsense are throwing me off from creating my next page. For the most part, the main page is just a list(menu) and Divs, with the CSS linked externally...and then the chunks of code from Google Adsense copypasta. I was wondering, what kind of coding would be recommended (to learn next) to hide all that Google code away, and link it externally similar to how CSS can be linked externally? If at all?Thanks, folks. I appreciate it! Link to comment Share on other sites More sharing options...
Synook Posted September 17, 2009 Share Posted September 17, 2009 Err, well, you can't show the Google Adsense code without actually displaying it on your page. If you provide a link we can help you figure out the layout... Link to comment Share on other sites More sharing options...
Skemcin Posted September 17, 2009 Share Posted September 17, 2009 To answer your question, we'd have to understand more about what your intent is. Do you want to "hide the google code" on the rendered page OR hide it in the raw code you work in to build the page?If it is the former, then you're pretty much out of luck unless you want to write it into an <iframe> (which would be pointless) or write another javascript file that uses document.write to write out all the google code (which is overly redundant).If is the latter, then you'll want to look into server side includes. Most web hosting services have this feature turned on by default. As you branch out your learning to include a server side scripting language (coldfusion, asp, php, .net, etc.) you'll find the functionality exists there too - and the usefulness of it grows exponentially.In any respect, let me know if that helps or what other information you might need to get address your question. Link to comment Share on other sites More sharing options...
taaron12 Posted September 17, 2009 Author Share Posted September 17, 2009 To answer your question, we'd have to understand more about what your intent is. Do you want to "hide the google code" on the rendered page OR hide it in the raw code you work in to build the page?If it is the former, then you're pretty much out of luck unless you want to write it into an <iframe> (which would be pointless) or write another javascript file that uses document.write to write out all the google code (which is overly redundant).If is the latter, then you'll want to look into server side includes. Most web hosting services have this feature turned on by default. As you branch out your learning to include a server side scripting language (coldfusion, asp, php, .net, etc.) you'll find the functionality exists there too - and the usefulness of it grows exponentially.In any respect, let me know if that helps or what other information you might need to get address your question.Thanks! That's what I was wanting to do; Hide it in the raw code. Sorry about not being too clear on the question. Early morning posting shouldn't be done without some coffee. :)Appreciate it! Off to read about server side programming now.. Link to comment Share on other sites More sharing options...
Skemcin Posted September 18, 2009 Share Posted September 18, 2009 You're welcome. Let me point this out again in case you missed it above...you do not need server side programming to do what you want. At the very least you will need to do server side includes:SSI (Server Side Include)A type of HTML comment inserted into a web page to instruct the web server to generate dynamic content. The most common use is to include standard header or footer for the page.re: http://www.w3schools.com/asp/asp_incfiles.aspYou'll have to check with your hosting provider to make sure they are support.What I've done in the past is (years ago when learning) I would make my template in HTML. Then pull out the stuff that repeats on every page and make it my SSI files. Although I didn't know any ASP (let alone anything else) I still used the ASP extension on all my file names. With all you could do, I only used the ASP file/code just for SSI. IT seems rediculous, but its one way to get started. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.