Jump to content

help with links in a webpage


Guest lardylarry

Recommended Posts

Guest lardylarry

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 post
Share on other sites

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...