How can you get the name of a button into a javascript variable?
This fairly simple. I am making a page that has a button that the user can click that will bring him/her to a website. The website url is that text that is written on the button.
precode
var web = Appery("ButtonName").val();
window.location.href='http://'+web;
/code /pre
This brings me to a page with "a href="http://" rel="nofollow"http:///a" as address, but noting else. I have used an alert to show me what is in the variable and the alert pops up blank. I have tried doing the same thing where the variable gets a value from an input field and that works just fine. So, one would conclude that the code "Appery("ButtonName").val();" actually doesn't get the text on the button.
Is there any way to put the text that is written on a button into a variable?