1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

2 webpage on 1page?

Discussion in 'HTML & Website Design' started by n00bl3t, Jul 26, 2016.

  1. #1
    is it possible to do something like this?

    first... the visitor goes to...

    www.mydomain.com

    and on that page there is a link... that goes to:

    www.mydomain.com/?view_hidden_html

    so basically... I wanted to have all page1 and page2 coded on www.mydomain.com html file... I just do not want to display the page2 yet until the visitor clicks on the link...

    I have noticed it on some similar occasion that when you click a link it scrolls up or down to an html element... but basically this displays "ALL" element...

    I wanted mine to hide all other elements until the user clicks on a link... then the hidden element appears and replaces the first element
     
    n00bl3t, Jul 26, 2016 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    hdewantara, Jul 26, 2016 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    If you are using PHP it's really quite simple

    check to see if the $_GET variable exists and echo out content accordingly.
     
    sarahk, Jul 26, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Depends on whether or not it's important that the hidden content isn't even shown in the source code or not. If it can be in the source code, you can easily do this with javascript.
     
    PoPSiCLe, Jul 26, 2016 IP
  5. n00bl3t

    n00bl3t Well-Known Member

    Messages:
    383
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #5
    thanks guys...

    how about hidden from a source code as well? and also... it will be on blogspot... so I think php is not an option?
     
    n00bl3t, Jul 26, 2016 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #6
    In blogspot you can hide it but someone clever will always be able to find it.
    If you are serious about your content and your site you wouldn't be on blogspot anyway

    You can use javascript to check the variables and then write content and hide the content in a js in dropbox and it would be hard to grab but not impossible.
     
    sarahk, Jul 26, 2016 IP
  7. n00bl3t

    n00bl3t Well-Known Member

    Messages:
    383
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #7
    Hi Sarah,

    Can you elaborate a little bit more on the "JS in DROPBOX"?
     
    n00bl3t, Jul 26, 2016 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #8
    I haven't played with templates in blogspot in years but whenever I review one it seems that people put the javascript in the page. Presumably you can also link to a file called mysecretstuff.js that you've saved in a public dropbox folder

    In mysecretstuff.js you'd have
    function getQueryVariable(variable) {
           var query = window.location.search.substring(1);
           var vars = query.split("&");
           for (var i=0;i<vars.length;i++) {
                   var pair = vars[i].split("=");
                   if(pair[0] == variable){
                      if (pair.length == 1) { return true; }
                      else { return pair[1];}
           }
           return(false);
    }
    
    function getSecretStuff(){
      var e = document.getElementById('secretspot');
      e.innerHTML = "What you want to hide";
    }
    
    function getPublicStuff(){
      var e = document.getElementById('secretspot');
      e.innerHTML = "What anyone can see";
    }
    
    if (getQueryVariable('view_hidden_html')) { getSecretStuff(); }
    else { getPublicStuff(); }
    Code (markup):
     
    Last edited: Jul 26, 2016
    sarahk, Jul 26, 2016 IP
  9. gummyworms

    gummyworms Active Member

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #9
    This sounds like something that can be solved by httprequest? Does that sound familiar
     
    gummyworms, Jul 27, 2016 IP