Hi,
I've created a webpage where the user can enter an number/word into an address bar and it would appear somewhere else on the page - I also have back and forward buttons on the page (similar to a browser). But whenever i click the back or forwards button, instead of the last inputted number/word being popped back I get all of the words/numbers that have been inputted during that session. Anyone see where I'm going wrong?
Heres my code for the back button:
I've created a webpage where the user can enter an number/word into an address bar and it would appear somewhere else on the page - I also have back and forward buttons on the page (similar to a browser). But whenever i click the back or forwards button, instead of the last inputted number/word being popped back I get all of the words/numbers that have been inputted during that session. Anyone see where I'm going wrong?
Heres my code for the back button:
Code:
function Go_Back (){
var input2=navigation.url_out.value;
url2.push(input2 + '\n');
navigation.forward_stack.value=url2;
var input1=navigation.back_stack.value;
url1.pop();
navigation.url_out.value=input1;
}
Comment