Jmehl84
11-01-2002, 09:06 PM
I'm relatively new to Javascript.. this is just some basic code I'm having trouble making work.. I'm much for familiar with C++, and as such I'm inclined to try C++ code and syntax :)
What I am trying to do is have one link open two seperate IFrames, with different hrefs:
<script>
function twoForOne(var mainLink, var titleLink)
{
parent.mainFrame.location=mainLink
parent.titleFrame.location=titleLink
}
</script>
and then, in context:
<a onclick="twoForOne("main.html","maintitle.html")">
If anyone could tell me whats wrong with this code it would be much appreciated. Also, if there is some way in which I could do this AND keep my <a href> CSS settings - that would be great.
Thanks,
Jeff
What I am trying to do is have one link open two seperate IFrames, with different hrefs:
<script>
function twoForOne(var mainLink, var titleLink)
{
parent.mainFrame.location=mainLink
parent.titleFrame.location=titleLink
}
</script>
and then, in context:
<a onclick="twoForOne("main.html","maintitle.html")">
If anyone could tell me whats wrong with this code it would be much appreciated. Also, if there is some way in which I could do this AND keep my <a href> CSS settings - that would be great.
Thanks,
Jeff