JChilds Posted June 18, 2008 Share Posted June 18, 2008 I'm using javascript:document.getElementById("QUESTION").innerHTML = "ANSWER"; It works perfectly. It changes the text. BUT, a millisecond after it has changed the text, It takes e to a new page with ANSWER on it. Any idea why this is happening? Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 18, 2008 Share Posted June 18, 2008 Probably because you're using "javascript:" in a place where you could use an event handler. We need to see more code to help you out. Quote Link to comment Share on other sites More sharing options...
JChilds Posted June 18, 2008 Author Share Posted June 18, 2008 Thats all the code there is. I only have access to the code of one button..., So i have to use javascript: Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 18, 2008 Share Posted June 18, 2008 Show us the code containing the element with the id "QUESTION".... You're giving us not enough to go on. Quote Link to comment Share on other sites More sharing options...
JChilds Posted June 18, 2008 Author Share Posted June 18, 2008 <td><span id="QUESTION" title="717" >3157</span> </td> Quote Link to comment Share on other sites More sharing options...
haku Posted June 18, 2008 Share Posted June 18, 2008 Add 'return false' to the next line after that. Quote Link to comment Share on other sites More sharing options...
JChilds Posted June 18, 2008 Author Share Posted June 18, 2008 That did'nt work. but it put me on the right track! Adding exit worked a treat. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.