Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: putting code snippets into html
09-29-2011, 01:27 AM #1
- Join Date
- Sep 2010
- Thanked 0 Times in 0 Posts
putting code snippets into html
When I find these snippets, they are usually in a format like this:
Anyways, I hoping somebody can provide a pointer as to how to use these snippets or how to correctly place things like this. I'm assuming there's a relatively uniform way that people are posting their tiny little js codes and I'm missing some basic knowledge as to how to use it.
Any help is greatly appreciated.
09-29-2011, 01:55 AM #2
Actually, it doesn't matter where you put it, for many purposes.
So maybe you need to provide a *real* example of what doesn't work for you.
Here's a clue, though:
If it's a PHP page, bring it up in your browser.
Then click on the VIEW menu item.
Then click on the SOURCE or PAGE SOURCE menu item.
That will show you the HTML (with JS) as the browser sees it.
If it doesn't look right, fix the PHP until it does.
If you think it does look right, but it still doesn't work for you, then copy/paste it here.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
09-29-2011, 01:58 AM #3
for convenience, I tend to do it like this:
But there are various ways to do it. I guess others have their advantages.
If you're having trouble with some real code, why not post it?