• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

****::::::::::Help with JavaScript::::::::::::******

mackstann

Banned
how do i make one link open up two different pages, one in one frame, and one in another??? i tried nesting <a>'s but it didnt work. heres what i tried:

<a href=index.html target=&quot;_top&quot;><a href=hometitle.html target=&quot;title&quot;>Home</a></a>
<a href=me.html target=&quot;body&quot;><a href=metitle.html target=&quot;title&quot;>Me</a></a>
<a href=pcfun.html target=&quot;body&quot;><a href=pcfuntitle.html target=&quot;title&quot;>PC Fun</a></a>
<a href=/files/images/ target=&quot;body&quot;><a href=imagestitle.html target=&quot;title&quot;>Images</a></a>
<a href=/files/ target=&quot;body&quot;><a href=filestitle.html target=&quot;title&quot;Files</a></a>
<a href=links.html target=&quot;body&quot;><a hfef=linkstitle.html target=&quot;title&quot;>Links</a></a>

its so that when i load a page, the content appears in one frame and the title page appears in the top frame.
 
Uh...the easiest way I would know how to do it would be to link to a page with a new frameset. I've never seen anyone try to stack <a>'s like that...Let me work on it for a minute, see what happens

more to come
 
well, i want to just refresh the two frames to new pages, you know, and not have like 5 more html files. my new site layout is almost done, this is one of the finishing touches, basically the site hasnt changes except i switched to frames
 
mmm...my javascript's a little rusty too but I can find out. I know it's pretty simple though. I'll post it sometime tonight though. If you're in a hurry, search the web--There's a dozen good java resources...It's something like the following:

start script
frames.(1)=firstlink.html
frames.(2)=secondlink.html
end script

Can anyone help this guy? It's such an easy solution but I can't find my java manual right now...
 
Okay buddy, try this out:

---In the head, declare the function like this---

<script language=&quot;JavaScript&quot;>
function twoFramesFunction () {
NAMEOFYOURFIRSTFRAME.documnent.value=&quot;firstURL&quot;
NAMEOFYOURSECONDFRAME.documnent.value=&quot;secondURL&quot;
}
</script>

---then in the body, call the function with a button---

<input type=&quot;button&quot; name=&quot;thisbutton&quot; value = &quot;Click to load something into two frames&quot; onclick=&quot;twoFramesFunction ()&quot;>
 
well i definitely want a link not a button, could i do this instead?

<a href=&quot;twoFramesFunction ()&quot;>Link</a>

I'll fiddle around and report back
 
ok, i'm not good a javascript at all. so here is my best shot.

try nesting html in javascript. like this
<u MM_goToURL('parent','t');return document.MM_returnValue&quot;><a href=&quot;whatever.html&quot; target=&quot;_blank&quot;>TEXT HERE</a></u>

ok notice where it says &quot;parent&quot; put that as whatever frame. and where it says &quot;_blank&quot; make that the main frame or whatever.

oh and put this in the head

<script language=&quot;JavaScript&quot;>
<!--

function MM_goToURL() {
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+&quot;.location='&quot;+args[i+1]+&quot;'&quot😉;
}
//-->
</script>

if this doesn't work then uhmm, well i really don't know.


peace
sean
 
AdamDuritz---I tried this, but it only fills the body frame, not the title also. I want it to fill two frames with two different pages.

Of course, I can't really bitch cus I have no idea how to do it myself, but anyone else's suggestions would be nice!!!
 


<< well i definitely want a link not a button, could i do this instead?

<a href=&quot;twoFramesFunction ()&quot;>Link</a>

I'll fiddle around and report back
>>



try <A HREF=&quot;javascript:twoFramesFunction()&quot;>link</A>
at this moment i'm too sleepy to try doing it the correct way... if it's still problematic tomorrow i'll try working on it....

-561-

edit: btw, i think you'll get faster response if you've posted in the software forum
 
ok i tried that, i got an error saying that &quot;title&quot;, which is the name of one of the frames, is undefined. Do i need to declare it as a veriable or something?

BTW whenever i post in ANY forum except OT or GH, I get jack squat for replies.
 
<a href=&quot;control2.htm&quot; target=&quot;_self&quot;

onclick=&quot;changeTopMain('greentop.htm','mintpg.htm')&quot;>

Change all three framesZ

</a>


Never tried but I got this from a tutorial a while back. Maybe I can find the link again.
 
No I'm not crazy....

My Netscape every once in a while does that. Changes a bunch of characters into question marks. I'm not editing as proof of this stoopid sh!t. If anyone else heard of something this crazy please let me know. I need company 🙁

Anyway the series of question marks was this link that I'm now posting from IE:
http://www.coolnerds.com/jscript/framesjs/framesjs.htm

Hope that's what you wanted.
 
Back
Top