Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to limit executions of Konami to display different messages

Status
Not open for further replies.

sleekpanther

Technical User
Aug 5, 2010
1
CA
JS beginner! Basically how do I set the js so that the first time konami code is activated it loads 'First.html' (first message) and then 2nd time activated it runs 'Second.html' (second message) etc. I'll have a finite number of loops (say 5). See html bit below. Can I track the load/executions from the html script bit or do I need to track it from within the konami script and if so, how?

html bit:
<script type="text/javascript" src="konami.js"></script>
<script type="text/javascript">
var konami = new konami();
konami.load("First.html");
</script>

Original source of konami.js
Any help greatly appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top