CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   jquery: getting the variable's value from a link (http://www.codingforums.com/showthread.php?t=183030)

lauthiamkok 11-25-2009 02:24 PM

jquery: getting the variable's value from a link
 
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,
Code:

<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,

Code:

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

Many thanks,
Lau


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.