codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Header Frame ?  Archive Import (Scott) at 14:19 on Monday, July 28, 2003
 

What I am looking to do is...

I run a website that deals with THUMBNAIL PHOTO GALLERIES. So when a sufer clicks on a link on my page the thumbnail gallery page opens. What I am looking for is the ABSOLUTE SIMPLEST! LOL way to have the gallery page open in a new window with a Header for some advertising above the page with the thumbnails. I hope that makes sense. Any help would be appreciated.

Thanks,
Scott
ICQ 16838997

  Re: Header Frame ?  Troy Wolf at 12:59 on Tuesday, July 29, 2003
 

Can you clarify a bit? Is this what you want: A narrow frame that scrolls left and right. This frame shows the thumbnails. When a thumbnail is clicked, a larger frame below the thumbnail frame displays the photo. Also, you`d like space for an advertising banner either in the thumbnail frame, or in its own frame at the top.

Would you prefer a page that shows the advertising and the thumbs with a popup window that shows the selected photo?

Help us understand your goal and vision, and I`m sure we can help you get started.
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Header Frame ?  Archive Import (Scott) at 17:54 on Friday, August 01, 2003
 

Ok, I will try to be more specific.
Right now when a surfer comes to my tgp (Thumbnailgallery Post) the sufer will click on a text link and that link will open in a new window. That link or thumbnail gallery that opened is not hosted locally. What I would like to do is have that page that opens open under a header that is 100% width by about 100 pixels high. So that I could put a banner or text or anything in that "header". I hope that is somewhat more specific? Crossing fingers! lol

  Re: Header Frame ?  Troy Wolf at 23:39 on Friday, August 01, 2003
 

Yeah, I think I see what you want now. FRAMES are what you want. Here is a sample FRAMESET that creates a 2 frame page. The top frame is 100 pixels high and the bottom frame takes up all the rest of the space and will allow scrolling if necessary.

<frameset rows="100,*" frameborder="no" framespacing="0" border="0">
<frame noresize
frameborder="no"
marginheight="0"
marginwidth="0"
name="header"
scrolling="no"
src="MyBanner.html">
<frame noresize
frameborder="no"
marginheight="0"
marginwidth="0"
name="gallery"
scrolling="auto"
src="Gallery.html">
</frameset>

So make your initial page this frameset. If your links are contained in a page in the "gallery" frame, then those links will work just like normal and the target page will load right into that frame -- leaving your header frame alone. If you need to get fancier than this, let us know.


Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Header Frame ?  Archive Import (Scott) at 09:35 on Saturday, August 02, 2003
 

Thank you very much I willgive that a try!

Scott

  Re: Header Frame ?  Archive Import (Scott) at 13:25 on Saturday, August 02, 2003
 

You will tell by this question how advanced I am! LOL

The code you gave me above where do I put it exactly?

Thank you,
Scott

  Re: Header Frame ?  Troy Wolf at 18:07 on Saturday, August 02, 2003
 

No problem! In fact, I thought to myself after I posted that I should have explained more. <FRAMES> are just a strange animal until you do them once--then they make sense. The code I sent you can be you entire code for your index.html page. The page only contains the frameset. It loads the other 2 pages in their respective frames. So take the code I posted, paste it into a new file, change the 2 file references to be the names of your 2 files (header and main), and save as index.html (or whatever you want to call the page). You`ll see!
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Header Frame ?  Troy Wolf at 11:13 on Sunday, August 03, 2003
 

The simplest option is to make your main page the frameset and have all your pages working in the frameset. But, if you want to have a non-frame page link to the frameset and be able to dynamically specify the target of the "gallery" frame, a couple of options come to mind. If your server allows ASP or PHP or CGI, you can pass the gallery url as an argument, then write it into the frameset server-side. But, you posted in the HTML forum, and the solution I`m showing you here doesn`t require any server-side scripting, so anyone with access to any kind of a web server should be able to create this solution.

Save this code as a file named ShowGallery.html (This is the same as I posted before except now I`m leaving the gallery src blank.)
---------------------------------------

<frameset rows="100,*" frameborder="no" framespacing="0" border="0">
<frame noresize
frameborder="no"
marginheight="0"
marginwidth="0"
name="header"
scrolling="no"
src="MyBanner.html">
<frame noresize
frameborder="no"
marginheight="0"
marginwidth="0"
name="gallery"
scrolling="auto"
src="">
</frameset>

------------------------------------

Now, here is complete HTML source for a page that is not a frameset (your main page) that will open a second window, load the frameset into, load your banner page into the header frame, then load whatever specific gallery you want into the gallery frame. Having this frameset pop in a second window is the key because we need the window to be a "child" of the main window so we can reference it using javascript. Remember that you will have to replace all the single-ticks (just retype them). When you copy and paste from toadcode.com, you end up with the wrong single ticks. (At least I do.)
------------------------------------

<html>
<head>
<title>Sample Code from Troy Wolf</title>
<script language=javascript1.2>
function ShowGallery(gallery) {
winGallery = window.open("ShowGallery.html", "ShowGallery");
winGallery.top.gallery.location = gallery;
}

</script>
</head>
<body>
This is a main page that will contain a link to specific galleries.
<p><a href="JavaScript:ShowGallery(`gallery1.html`)">View my gallery</a>
<p><a href="JavaScript:ShowGallery(`gallery2.html`)">View my gallery</a>
</body>
</html>

------------------------------------
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Header Frame ?  Archive Import (Scott) at 12:16 on Sunday, August 03, 2003
 

Thank you, I will play around with it a bit. I may have some more questions. I appreciate the time you are taking in responding.

Thank you
Scott

  Re: Header Frame ?  Archive Import (Scott) at 12:43 on Tuesday, August 19, 2003
 

Thanks, I am sure I am making this more difficult then it is!

Scott

  Re: Header Frame ?  Troy Wolf at 01:19 on Saturday, August 30, 2003
 

Single Tick Issue: By "single tick" I mean the apostrophe like in the word "it`s". As you may know, there is more than one kind of single tick. This forum converts the standard single tick into a different ASCII code. So when you copy & paste code from this forum into your editor, you`ll need to do a global replace. Just copy one of the single ticks from the pasted code, then tell your editor to replace all of them with your standard single tick. I hope that made sense.

Whether your gallery page is hosted on your own server or in China, it doesn`t matter. The page that you pass to the function could be "gallery1.html" or "http://www.yahoo.com/gallery1.html" -- whatever you need it to be.

As far as understanding the code...take the two pages of code I posted and try them--it`s fully working code to do what you want. Did you get the code to work? If not, are you getting an error? If so, what is the error?

You WILL get this, Scott!
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Header Frame ?  Scott at 14:34 on Saturday, August 30, 2003
 

I appreciate your time in responding to me again.

Yes when I attempted to run the page I did get a java script error. But I did not do the "tick" thing.

In the script you gave me there is this line...
(`gallery1.html`) where it shows both ticks running the same way, do I need to change them both the same tick? "'" or do they need to be different like "`"?

Thanks for your confidence,
Scott

  Re: Header Frame ?  yutsuko1983 at 07:55 on Thursday, November 25, 2004
 

im also having a similar problem. I would like to create my own photo gallery with only javascript n html codings as my free hosting does not support php files. the problem is, everytime i tried to save my file, an error occur which i dun understand. it could be due to the file having scripts unsupporting it. i would like my gallery to have thumbnails linking to the original picture and on the same page so that i could disable right clicks. i have some scripts here but i do not know how to put them together and setting the links so that it will appear in a frame in the same page.could someone help me out? thanks


//script for the slides//

<SCRIPT LANGUAGE="JavaScript">
var slide = new Array();
slide[0] = "/forum/image1.jpg";
slide[1] = "/forum/image2.jpg";
slide[2] = "/forum/image3.jpg";
var current = 0;
function advance(){
current++;
if(slide[current]){document.images.show.src = slide[current];
window.status='Slide '+(current+1)+' of '+slide.length+': '+slide[current];}
}
function retract(){
current--;
if(slide[current]){document.images.show.src = slide[current];
window.status='Slide '+(current+1)+' of '+slide.length+': '+slide[current];}
}
</SCRIPT>
<form name="formname">
<TABLE cellspacing=1 cellpadding=1 bgcolor="#000000">
<TR><TD colspan=2 align=center bgcolor="white">
<b>Pictures of our vacation</b>
</td></tr>
<TR>
<TD colspan=2 align=center bgcolor="white">
<img src="/forum/image1.jpg" name="show" width=300 height=300></td></tr>
<tr><td align=center bgcolor="white" height=30 width="50%">
<input type=button onclick="retract();" value="<< <<">
</td><td align=center bgcolor="white" height=30 width="50%">
<input type=button onclick="advance();" value=">> >>">
</TD>
</TR>
</TABLE>
</form>

//frame script//
<FRAMESET cols="100,*" frameborder="" border="" framespacing="" bordercolor="">
<FRAME name="leftFrame" scrolling="" noresize src="">
<FRAME name="mainFrame" src="">
</FRAMESET>

<Added>

<!-- Copy and paste all of the code below to a blank page in your web page editor or in any text editor such as Notepad or Wordpad and save as an HTML file -->

<html>
<head>
<title>My Photo Gallery - MySite.com</title>
<meta name='DESCRIPTION' CONTENT='Welcome to my photo gallery.'>
<meta name='KEYWORDS' CONTENT='photo, gallery, album, collection'>
<meta name='TITLE' CONTENT='MY PHOTO GALLERY'>
<link rel=stylesheet type='text/css' href='/forum/style1.css'>
</head>
<body>
<table cellpadding=8 cellspacing=8 border=0 align=center width=70%>
<tr valign=top align=center>
<td class=extra colspan=4>
My Photo Gallery</td>

</tr>
<tr valign=top align=center>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.1</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.2</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.3</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.4</td>
</tr>

<tr valign=top align=center>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.5</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.6</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.7</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.8</td>
</tr>

<tr valign=top align=center>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.9</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.10</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.11</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.12</td>
</tr>

<tr valign=top align=center>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.13</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.14</td>
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.15</td>
//thumbnail script//
<td><a href='/forum/images/pic.jpg' target='_new' title='Click to enlarge'>
<img src='/forum/pic.jpg' width=100 height=75 border=0></a>
<br>Photo Caption<br>No.16</td>
</tr>

<tr valign=top align=center>
<td class=extra colspan=4>
<a href='#' title='Previous Page'><< Back</a> |
<a href='#' title='Next Page'>Next >></a></td>
<tr>
</table>

<!-- You are not authorized to remove the code below -->
<p align=right><font size=1><a href='http://www.shuvorim.tk' target='_new' title='Copyright ShuvoRim Pvt. Ltd.'>©ShuvoRim Pvt. Ltd.</a></font></p><p align=right><font size=1><a href='http://www.creatingonline.com' target='_new'>Created with generator at CreatingOnline.com</a></font></p>
<!-- You are not authorized to remove the code above -->

</body>
</html>


  Re: Header Frame ?  Isabella8688 at 00:58 on Friday, March 02, 2012
 

Thanks you for the post.

____________________
http://lotsfiles.com/watch-dr-seuss-the-lorax-online-free/








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: calling C# from javascript
•  Re: Header Frame ?
•  Adhyayan - Annual Student Conference and Online Coding Festival
•  Re: Gidview row disable
•  Re: Knowing how to get TaylorMade R11 Irons
•  Re: refresh parent after closing pop up window
•  TaylorMade RocketBallz RBZ Driver will travel long and low
•  Supposedly the TaylorMade R11 Irons are supposed
•  TaylorMade R11s Fairway Wood


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012