HTML Troubles

Status
Not open for further replies.

hjpotter92

The Boy Who Lived
I have thepic of the file here which I am creating....

*willhostforfood.com/users/hjpotter92/HTML%20Problem.jpg

The extreme left menu is the list of the items.
the top right is the item
and bottom right is the description.​

Now, the trouble is that, I want it such that If I press any thing in MENU, then the description and item both should comeat once. It is based on frames. and the list is of games.... Please suggest me something in HTMLs... Don't use Javascripts please...
 

Bandu

Journeyman
Share some code as well and the part where you are facing trouble.

What frames are you using? iframes? or just plain old frames?

IMO, some javascript would be required.

Edit:

Here you go. I quickly wrote down something, but unfortunately, it uses javascript.
If you are so adamant about not using javascript, do let me know, and we can try and figure out a non-js solution.

Here is the snap:
*img135.imageshack.us/img135/1376/hjpotterug3.th.png*img135.imageshack.us/images/thpix.gif

Code from the main html page:
Code:
<html>
    <frameset rows="90%,10%">
            <frameset cols="25%,75%">
                <frame src="frame_b.htm" name='frameb'>
                <frame src="frame_c.htm" name='framec'>
            </frameset>
            <frame src="frame_a.htm"  name='framea'>
    </frameset>
</html>
Code from frame_a.htm
Code:
<html>
    <head>
    <title>Frame_A</title>
    </head>
    <body>
        This is Frame A
    </body>
</html>
Code from frame_b.htm
Code:
<html>
    <head>
        <title>Frame_B</title>
        <script language='Javascript'>
        function onItemClick()
        {
            window.parent.frames[1].document.writeln("<BR>Hey, you clicked. I am the image");
            window.parent.frames[2].document.writeln("<BR>Hey, you clicked. I'm the description.");
        }
        </script>
    </head>
    <body>
        This is Frame B<BR>
        <a href='javascript:void(0)'; onclick='onItemClick()'>I am an item. click me</a>
    </body>
</html>
Code from frame_c.htm
Code:
<html>
    <head>
        <title>Frame_C</title>
    </head>
    <body>
        This is Frame C
    </body>
</html>
 
Last edited:
OP
hjpotter92

hjpotter92

The Boy Who Lived
Code:
       <script language='Javascript'>
        function onItemClick()
        {
            window.parent.frames[1].document.writeln("<BR>Hey, you clicked. I am the image");
            window.parent.frames[2].document.writeln("<BR>Hey, you clicked. I'm the description.");
        }
        </script>
        This is Frame B<BR>
        <a href='javascript:void(0)'; onclick='onItemClick()'>I am an item. click me</a>

This is the problem area in Frame B. I have more than 30 items in Frame 'B'. So assigning Java to each of them would make the file more than 60 MB large. :lol: They are simple and old frames. I don't have a trouble with Java.
 

Bandu

Journeyman
No, thats not true. We can assign each element a unique ID, or name, and devise a JS function that would do the rest. That way, we will be reducing the file size.

I have some questions though. Is this static HTML or the content is being pulled dynamically and rendered?

If you can share the source here, please do so. That way, we can work on the actual sources. If not, give some ideas / snippets about your source.
 
OP
hjpotter92

hjpotter92

The Boy Who Lived
OK. I will give it. Suppose my index file which stores the info about the frames is in main folder where I am working. I have another 3-4 folders inside it.
  1. SWF GAMES
  2. CSS
  3. Pics
  4. Description
  5. Sources

In SWF Games I have 32 games. Each of them has been embedded in separate HTML file and similarly is the description. I tried to use the java code:
Code:
function change_and_disp(var ID_name, var desc)
{
        window.parent.frames['game'].src="SWF GAMES/"+ID_name+".html";
        window.parent.frames['desc'].src="Description/"+desc+".html";
}
 

Bandu

Journeyman
^I don't see any problem using it that way. Are you still looking for a solution? Your last post is not very clear. You said "tried to use..."
 
Status
Not open for further replies.
Top Bottom