Hi,
I have a page (“treatments.htm”) which calls calls various functions when buttons are pressed.
For instance, when the page loads, using the innerHTML property the funtion “treatmentsIntro()” is called using <body onLoad=”treatmentsIntro()”>.
This displays text & on the page between in the <div id=”outputTreatments”>
</div> tags.
Now wehn I click on one of my buttons on the page, other functions are called, which display different images & texts between the <div id=”outputTreatments”> tags. So far so good.
What I am now trying to do is create links on my site map page not only to the treatments.htm page, but also to the effect that when I click on the “price list” link, then the user is taken to the “treatmenst.htm” page and the function “createTable()” is called on body onload so that the price list is displayed rather straight away rather than the “treatmenstIntro()” function.
I am using the following test page:
<html>
<head>
<title>JavaScript location link test</title>
</head>
<body>
<a href=”javascript:location=’treatments.htm’;>Show me the money!</a>
</body>
</html>
Is there a way of making this link automatically call the “createTable()”function when the page loads?
Thanks
LF