Your suggestion looks good.
But before you replied, i had achieved what I needed using the code below. Thanks for the help tho.
And lots of Thanks to the JSXGraph team, for developing such a wonderful piece of software!
var p1 = board.create('point', [-1.0, 0.0], {fixed: true});
var p2 = board.create('point', [0.4, 0.0], {fixed: true});
var l1 = board.create('line', [p1, p2], {fixed: true, highlight: false, strokeColor: '#000000'});
// Point B...glider that glides on Line1
var glider = board.create('glider', [0, 0, l1], {name: 'Point B', snapToGrid: true, snapSizeX: .001});
//Point A, used to control slope of Line 2
var p4 = board.create('point', [.2, 250], {name: 'Point A'});
//Line 2, connects point A and B
var l2 = board.create('line', [glider, p4]);
//This translates Point C, depends on Point A
translateTrans = board.create('transform',[0.1,0], {type:'translate'});
//Point C, used to move the perpendicular line
var p3 = board.create('point', [glider, translateTrans], {visible: true});
//Creates a perpendicular to Line1
var perp1 = board.create('perpendicular', [l1, p3], {highlight: false, strokeWidth: 1});
//Creates the Intersection point X
var inter = board.create('intersection',[perp1,l2,0],{face: 'x', name: '', size: 8});