Jump to content

Adding rows to SmartFrames script


josephbupe

Recommended Posts

Hi,

 

I am developing a web application which will be comprised of three columns: (1) Search form, (2) Image gallery, (3) Image details. The site is going to be more like html framesets, but research reveals that framesets are not favourable due to many reasons. I however found an alternative that I want to use instead of html framesets http://www.ironspider.ca/frames/smartframes.htm

 

I thought it would be easy for me to add rows which should serve as a page header, but I was wrong. I tried adding

 

 

document.write('<frameset rows="17%,*" frameborder="no">');

 

to this part of the code, but row apeared in a wrong place at the bottom:

// Writes frameset

document.write('<frameset rows="17%,*" frameborder="no">');
document.write('<frameset cols="25%,75%" frameborder="no">');
document.write('<frame src="' + menuURL + '" name="menu">');
document.write('<frame src="' + contentURL + '" name="content" marginheight="15" marginwidth="50" scrolling="yes">');
// -->

The original script for the index.html page is as follows:

<!--
/* SmartFrames - Author: Robert Darrell - http://www.ironspider.ca/ */
// Defines variables
// REPLACE menu.htm WITH YOUR MENU PAGE
// REPLACE page1.htm WITH YOUR INITIAL CONTENT PAGE
menuURL = "menu.htm";
contentURL = "page1.htm";
reloadURL = parent.document.URL;
orphanURL = reloadURL.substring(reloadURL.indexOf('?')+1, reloadURL.indexOf('&'));
frameName = reloadURL.substring(reloadURL.indexOf('&')+1, reloadURL.length);

// Reassigns variable according to frame name passed by orphan
if (frameName == "menu") {
menuURL = orphanURL; 
} else if (frameName == "content") {
contentURL = orphanURL;
}

// Writes frameset
document.write('<frameset cols="25%,75%" frameborder="no">');
document.write('<frame src="' + menuURL + '" name="menu">');
document.write('<frame src="' + contentURL + '" name="content" marginheight="15" marginwidth="50" scrolling="yes">');
// -->
</script>

<!-- Use the noframes section to help search engines index your site -->
<noframes>THIS WEBSITE IS ABOUT...<br><br>
<a href="menu.htm">Site Menu</a>
</noframes>

</frameset>

I hope someone will help.

 

Regards.

 

joseph

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.