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('U S')">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%,2 0%">
<FRAME SRC="menu.html" >
<FRAME SRC="detail.htm l" name="detail">
<FRAME SRC="quickLaunc h.html">
</FRAMESET>
</FRAMESET><nofra mes></noframes>[/HTML]
and in siteTitle.html I have this,
[HTML]<td><a href="title.htm l" onclick="goToMa in('index.html' )"> Home</a> >&nb sp;<script>docu ment.write(getS iteName())</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,