KevinY Posted June 13, 2006 Share Posted June 13, 2006 thanks scott100 Link to comment Share on other sites More sharing options...
scott100 Posted June 13, 2006 Share Posted June 13, 2006 If anyone thinks they can help me out, please reply or email me asap and Ill show you my code so far. ThanksThis seems like a straightforward task, please post your full code and we'll point you in the right direction Link to comment Share on other sites More sharing options...
KevinY Posted June 13, 2006 Author Share Posted June 13, 2006 thanks scott100 Link to comment Share on other sites More sharing options...
scott100 Posted June 13, 2006 Share Posted June 13, 2006 Give the question and id:What's Your Question: <input name="input" id="input" type="text" />When button is clicked call tellFortune()<input type="button" name="roll" value="Ask" onclick="tellFortune()">Tell fortune should look something like this. function tellFortune(){x=document.getElementById('input');newQuestion=x.value;if (newQuestion==oldQuestion){x.value="Please change question";}else { execute();oldQuestion=newQuestion; //Swap values ready for checking next question}} Remember to declare var oldQuestion=""; as a global variable Link to comment Share on other sites More sharing options...
KevinY Posted June 13, 2006 Author Share Posted June 13, 2006 you have just saved my life, thank YOU!!! Link to comment Share on other sites More sharing options...
scott100 Posted June 13, 2006 Share Posted June 13, 2006 you have just saved my life, thank YOU!!!<{POST_SNAPBACK}> I predicted so (sorry bad joke :ph34r: ) Link to comment Share on other sites More sharing options...
KevinY Posted June 13, 2006 Author Share Posted June 13, 2006 I predicted so (sorry bad joke :ph34r: )<{POST_SNAPBACK}> lol everything is cool now that im saved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now