My idea is to press a button that takes me to a web page. I've created a thing that dynamically creates a button and an anchor tag. When the button is clicked, I want it to "click"/fire up the anchor tag..
I've uploaded a demo to my site, when you try it out just leave everything as it is. Click the first button then the add button right away.. then try to click the dynamically created button.
Nothing happens, but if you watch the source you can find an anchor tag with the ID FL1000, I've set it up so that the anchor tag gets the ID from the value of the created button + 1000 just incase I need to use that ID..
Thanks guys...
edit: this is optimized for google chrome, haven't tried it out with other browser.
edit 2 (solution): Instead of "triggering" the click function on the anchor tag I simply made a variable that takes the href attribute from the anchor tag and goes to that location through document.location.
example:
var disis = $(this).val();
var tislink = '#' + disis + '1000';
var alink = $(tislink).attr('href');
window.open(alink,'_blank');
Thanks guys!