Dynamic Link Question

Discussion in 'Search Engine Optimization' started by vastbeyond, Jan 19, 2007.

  1. #1
    This is a question for SEO experts. I have a rather sophisticated site which customizes the look and feel of a particular PHP landing page based on which partner site links to it. I want SERPs to include just the top level page, and so I do not want to fool around with htmaccess to make static links for each "version" of the page. Also, I am hesitant to use re-directs. So, I want to accomplish two things--have lots of pages link to ONE static URL but also have those pages be able to pass PHP variables to change the look and feel of that static page when their users view the page.

    What I have devised is a bit of Javascript code along with a static link. What I would like to know is how Google, Yahoo, MSN, etc. will interpret this code and whether it will in any way downgrade my site for the use of such Javascript? Essentially what it is is an anchor surrounded by a div. When the page loads, it shows up as just a regular link to the static page. When the user moves the mouse over the link, the link changes to be a link incorporating various PHP variables.

    Here is the code:

    <head>
    <script language=javascript>

    function clickDynamic() {

    var d2=document.getElementById('dynamicchange');
    // -- d2Len holds the fixed starting value of the number of childNodes
    var d2Len=d2.childNodes.length;

    for (i=0;i<d2Len;i++){
    d2.removeChild(d2.childNodes[0]);
    }

    var newLink=document.createElement('a');
    newLink.setAttribute('href','http://www.mainsite.com/index.php?var1=100000');

    var linkText=document.createTextNode('Link to Main Site');
    newLink.appendChild(linkText);
    d2.appendChild(newLink);

    }
    </script>
    </head>
    <body>


    <div id="dynamicchange"><a onMouseOver="clickDynamic();" href="http://www.mainsite.com/index.php">Link to Main Site</a></div>

    </body>
    </html>


    Thoughts? Comments?

    THANKS!!!!
     
    vastbeyond, Jan 19, 2007 IP