...

View Full Version : jquery: getting the variable's value from a link



lauthiamkok
11-25-2009, 02:24 PM
Hi,
Is it possible to get the values of variable from a link and then pass it into javascript?

for instance from the link here,

<a href="incl_layouts/form_sign_up.php?w=500&h=100" class="load">Sign up</a>

w=500 and h=100 are the values I want to pass into the function click() below,


$(".load").click(function(){
var path = $(this).attr("href");
var width = w;
var height = h;
});

Many thanks,
Lau



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum