i’m having a problem about my program right now. i’m practicing a program in a html that would accept an ID, and i would like that ID to be paste in a <div> in my other html, using two separate javascript. here’s the javascript code:
$("#btnGetID").click( function() {
....
....
window.open('project.html');//used to open the other html file to paste the ID
pasteID($('#myID').text());//this is the function name with parameter.
});
the function pasteID(par) was coded in the other .js file. here’s the code:
function pasteID(par){
var p_id = pasteID(par);// this line displays an error "too much recursion" in firebug
return (p_id);
}
$("#DisplayID").click( function() {
$('#putID').attr("value", pasteID(par));
}
what’s is that error “too much recursion”? how can i make this program right without that error? i cannot think of anything that would display my ID in the other html. can please somebady help me.? please
this problem is already solved by using a cookie. please refer to this one. and thanks to experimentX.
hope this can help to some people out there that have the same question/problem.