I am a newbie in js, so please forgive me if the question is elementary. I am designing a page in maqetta (maqetta.org) and enjoyed using states! the only question I have is it seems that the way it calls the states is as follows: davinci.states.setState('state1')
for example in a button, it is defined a onclick proparty: onclick="davinci.states.setState('state1')"
Now, my question is if i want to load my page in a different state than normal state what should I do?
I tried this:
<script>
window.onload=davinci.states.setState('state1')
</script>
but it did not work! I think it should be a very elemantry question but I could not find a solution for it! Can anybody help me on this?
Thanks
It should be
You may also want to refer
http://www.w3schools.com/jsref/event_onload.asp
Best practice for using window.onload
https://developer.mozilla.org/en-US/docs/DOM/window.onload