I have a html page, which has some sites, when the user clicks on the site,
[HTML]<tr><td><a href="us.html" onclick = "setSiteCode('US')">USA</a></td></tr>[/HTML]
and the javascript is,
Expand|Select|Wrap|Line Numbers
- var siteCode = "";
- function setSiteCode(site)
- {
- window.siteCode=site;
- false;
- }
- function getSiteCode()
- {
- return window.siteCode;
- }
[HTML]<FRAMESET rows="12%,89%" cols="*">
<FRAME SRC="siteTitle.html" name="title">
<FRAMESET cols="15%,65%,20%">
<FRAME SRC="menu.html">
<FRAME SRC="detail.html" name="detail">
<FRAME SRC="quickLaunch.html">
</FRAMESET>
</FRAMESET><noframes></noframes>[/HTML]
and in siteTitle.html I have this,
[HTML]<td><a href="title.html" onclick="goToMain('index.html')"> Home</a> > <script>document.write(getSiteNa me())</script></td>
[/HTML]
But when I run, it is not getting set, the getSiteName is still empty.
Would greatly appreciate your help on this. I do not know what is wrong.
Thanks,