Guest lardylarry Posted January 9, 2007 Share Posted January 9, 2007 I'm very new to this; please help!I want to create a webpage where when I click a link, only a certain section of the webpage loads the link (like frames). Basically, I want to create something that looks like this site: http://everything-eririn.net/index.php . Notice how when you click on the navigation links, only the center part of the webpage loads the link. How do I do that? Does css allow me to do this (if not, what does)?The only method I know is to use frames using html, but that would mean I would have to create at least five frames to get the link to load in the center frame with four surrounding it, along with many other issues. Hope this makes some sense. I tried to search for help, but didn't know what to type into the search engine. Thanks in advance. Link to comment Share on other sites More sharing options...
vchris Posted January 9, 2007 Share Posted January 9, 2007 You would have to use the target attribute in your link.http://msdn.microsoft.com/workshop/author/...ties/target.asp Link to comment Share on other sites More sharing options...
BiteMe Posted January 10, 2007 Share Posted January 10, 2007 Or you could use and iframe, then use javascript to change the source of the page.eg - this is the index page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>untitled</title><script language="javascript" type="text/javascript">//<![CDATA[function changeSrc(page){ document.getElementById("content").src= page}function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x;}function wm_SetDivText(theObj,x,theText) { //Modification of MM_setTextOfLayer if ((obj=MM_findObj(theObj))!=null) with (obj) if (document.layers) {document.write(unescape(theText)); document.close();} else innerHTML = unescape(theText);}//]]></script></head><body><table width="664" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><iframe frameborder="0" height="310px" id="content" name="content" src="link1.htm" width="405px" scrolling="yes"></iframe></td> <td valign="top"><a href="#" onclick="changeSrc('link1.htm')">link 1</a><br /> <a href="#" onclick="changeSrc('link2.htm')">link2</a></td> </tr></table></body></html> this is the code for the other pages <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>blah</title></head><body class="internalPage"><table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td align="left"><p align="justify">This is link 1 </p></td> </tr></table></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now