3 replies
I was thinking about learning a little coding so I can add some little pieces of things to my web site. I can kind of read code to find things on peoples sites but can't write code quite yet. I was wondering when I am looking at page source for a web page the the coding seems to zig zag all over the page some lines starting at where I would think the beginning of a line would start then the next line might be indented a good bit. Does the coding have to be entered in like this and if so why. How could it matter if it were all in a nice straight line going down the page or not.

The other question I have is I often see a pop up box show up on a page after about 10 to 15 seconds asking for e-mail address in order to get something free a report or what ever. I don't seem to be able to find any code on the page source page for the pop up, how it is written so where is it. Thanks Mark
#coding
  • Profile picture of the author h4x0r
    Some people do code like that to protect their codes, but if you're smart enough and have experience you can pick it up,

    Can you show an example of such pop up? though the way you say it, it should be easy with javascript timers, you can make the java script code run after 15 second the page loads with a pop up, but if you can show an example, I can probably write you a code or copy it for you here.
    {{ DiscussionBoard.errors[10149756].message }}
  • Profile picture of the author nmwf
    It doesn't always matter how code is formatted on a web page as long as a browser or server can interpret it. Formatting with new lines, spaces, tabs, and indentations (for the most part) is for human convenience and understanding.

    I've seen plenty of (older) webpages coded as one line, and they rendered just fine in the browser.

    Can't help you with the popups. But there are tons of webpages that show how they're made.
    Signature
    Write comprehensible articles on *any* topic in seconds with First Draft...
    First Draft's: Download | Add-Ons | Templates | Purchase | Support | Affiliates
    {{ DiscussionBoard.errors[10149767].message }}
    • Profile picture of the author David Beroff
      A much more common answer as to why this happens is that the code is being generated dynamically, from many different server-side files, and the indenting often varies wildly from file to file. I personally try to keep my output consistent, but don't always succeed, which leads to the very behavior you're describing. Since the browser doesn't "care" about indenting, few people take the time to clean it up.
      Signature
      Put MY voice on YOUR video: AwesomeAmericanAudio.com
      {{ DiscussionBoard.errors[10150163].message }}

Trending Topics