Who know the name of this script?

Discussion in 'General Marketing' started by JohnS0N, Jun 21, 2008.

  1. #1
    The guys over at beating adwords use a javascript sign up from which pops right into your browser and you can also move it around.

    Where can I get this?
     
    JohnS0N, Jun 21, 2008 IP
  2. Num Lock

    Num Lock Active Member

    Messages:
    1,802
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Just view their source code
     
    Num Lock, Jun 21, 2008 IP
  3. JohnS0N

    JohnS0N Notable Member

    Messages:
    1,581
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Yeah, but the name says just <script src="CSS/scripts4.0.js" language="JavaScript">

    That doesn't help much
     
    JohnS0N, Jun 22, 2008 IP
  4. PagesThatConvert

    PagesThatConvert Peon

    Messages:
    4
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Then go to

    hxxp://www.beatingadwords.com/CSS/scripts4.0.js

    Also, it's just a Modal window that uses a fancy AJAX repositioning feature.

    Google for a modal window script and then install jQuery and use one of the AJAX repositioning features to set that up and you'll be on your way to something similar.
     
    PagesThatConvert, Jun 22, 2008 IP
    JohnS0N likes this.
  5. dalem

    dalem Peon

    Messages:
    494
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Here ya go......Just save it as scripts4.0.js

    // JavaScript Document
    <!--
    isIE=document.all;
    isNN=!document.all&&document.getElementById;
    isN4=document.layers;
    isActive=false;

    function MoveInit(e){
    topOne=isIE ? "BODY" : "HTML";
    whichOne=isIE ? document.all.FloatingLayer : document.getElementById("FloatingLayer");
    ActiveOne=isIE ? event.srcElement : e.target;
    while (ActiveOne.id!="titleBar"&&ActiveOne.tagName!=topOne){
    ActiveOne=isIE ? ActiveOne.parentElement : ActiveOne.parentNode;
    }
    if (ActiveOne.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichOne.style.left);
    nowY=parseInt(whichOne.style.top);
    MoveEnabled=true;
    document.onmousemove=Move;
    }
    }

    function Move(e){
    if (!MoveEnabled) return;
    whichOne.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
    whichOne.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
    return false;
    }

    function MoveN4(whatOne){
    if (!isN4) return;
    N4=eval(whatOne);
    N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
    N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
    }
    N4.onmousemove=function(e){
    if (isActive){
    N4.moveBy(e.x-N4x,e.y-N4y);
    return false;
    }
    }
    N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
    }
    }

    function ToggleFloatingLayer(DivID, iState) // 1 visible, 0 hidden
    {
    if(document.layers) //NN4+
    {
    document.layers[DivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById) //gecko(NN6) + IE 5+
    {
    var obj = document.getElementById(DivID);
    obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all) // IE 4
    {
    document.all[DivID].style.visibility = iState ? "visible" : "hidden";
    }
    }

    // pop-up functions
    ns4 = (document.layers)? true:false
    ie4 = (document.all)? true:false
    ns6 = ((!document.all) && (document.getElementById))? true:false

    function getObj(name)
    {
    if (ns6)
    {
    this.obj = document.getElementById(name);
    this.style = document.getElementById(name).style;
    }
    else if (ie4)
    {
    this.obj = document.all[name];
    this.style = document.all[name].style;
    }
    else if (ns4)
    {
    this.obj = getObjNN4(document,name);
    this.style = this.obj;
    }
    }

    function getObjNN4(obj,name)
    {
    var x = obj.layers;
    var foundLayer;
    for (var i=0;i<x.length;i++)
    {
    if (x.id == name)
    foundLayer = x;
    else if (x.layers.length)
    var tmp = getObjNN4(x,name);
    if (tmp) foundLayer = tmp;
    }
    return foundLayer;
    }

    function verifyRequired(formname) {

    var frm = new getObj(formname);

    if (frm.obj.from.value == "") {
    alert("The Email Address field is required.");
    return false;
    }
    if (frm.obj.name.value == "") {
    alert("The Name field is required.");
    return false;
    }
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (!filter.test(frm.obj.from.value)) {
    alert('Invalid Email Address.');
    return false;
    }
    return true;
    }

    document.onmousedown=MoveInit;
    document.onmouseup=Function("MoveEnabled=false");
    // -->
     
    dalem, Jun 22, 2008 IP
    TheVccMatey and JohnS0N like this.
  6. TheVccMatey

    TheVccMatey Peon

    Messages:
    5,346
    Likes Received:
    208
    Best Answers:
    0
    Trophy Points:
    0
    #6

    Thanks so much . Rep added.
     
    TheVccMatey, Jun 22, 2008 IP
  7. JohnS0N

    JohnS0N Notable Member

    Messages:
    1,581
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    210
    #7
    Likewise! Reps added.
     
    JohnS0N, Jun 22, 2008 IP