Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
CJ Webmaster Forums Forum Index » Other Languages

   
Iframes and Javascript Goto page 1, 2  Next
View previous topic :: View next topic  
Author Message
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Wed Apr 06, 2005 3:50 pm    Post subject: Iframes and Javascript

I am currently having a weird issue with iframed pages that contain javascript elements on the page. When you go to scroll down on the iframed page the javascript elements seem to "freeze and stick." I took a screenshot of this to help explain --> here. The issue seems to clear up if I navigate to another window and then return, but it doesn't make me feel much better knowing that my visitors would have to do this to see the page as it should be.
The two pages in question are my Pics and Radio page on my journal site http://www.katanya.net/Friends/index2.html
Has anyone else ever had similar issues? Does anyone have any suggestions?
Thanks in advance for the help.
Back to top
GodfatherUK
CJ-Design.com Moderator



Joined: 17 Sep 2004
Posts: 196
Location: UK

Posted: Wed Apr 06, 2005 6:09 pm    Post subject:

Well i have just visited the site and ot all seems to work fine.

It may be just a local problem for you.

Can i ask what browser you are using? You need to make sure your browser settings allow the loading of Java, Javascript etc.
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Thu Apr 07, 2005 4:10 am    Post subject:

I'm using IE6, and had another friend that said she saw the same thing happening when I asked her to check it.
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Thu Apr 07, 2005 9:33 am    Post subject:

Katanya wrote:
I'm using IE6, and had another friend that said she saw the same thing happening when I asked her to check it.


Possibility 1 //->
It is possible that when others are visiting your site that the server gets a little bogged down . Is your web-site a high-traffic area? If so , you may need to move to a web-host which uses a faster cpu.

Possibility 2 //->
If you're using Apache , you may have something rather small wrong with your configuration file which is causing the hesitation.

Possibility 3 //->
Your php code may be a tad off and may need to be optimized in order to be rid of the hesitation.

Possibility 4//->
Your browser settings are set to not permit some javascripting and some other scripting selections . If you're behind a networked system , It is highly advisable to leave these settings where they are. More than likely , someone has set these scripting selections to where they are in an effort to hide the internal IP# of the networked computer. If at all possible , go to a computer that you're sure of that isnt behind a network and then try visiting your site again to see if you're still experiencing the hesitation.
Hiding the true internal IP# is an effort to hide from hackers , advised to leave alone.

These possibilities are all that I could think of right off hand. In order for us to try and help you , we would probrably have to know more about your set up than you're prepared to devulge.

Cheers,
Danny
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Thu Apr 07, 2005 4:43 pm    Post subject:

In response to Danny's post:
1) My website definitely isn't a high traffic area, most of my friends don't even know I have that journal I believe.

2) I'm using IE6 on a Windows XP Pro machine.

3) Only the radio utilizes php, and I would have no idea how to optimize it.

4) I only use my home computer, which is split off a modem with a router so my husband and I can use the same connection. My browser is currently set to Medium Privacy and Security settings.
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Thu Apr 07, 2005 9:09 pm    Post subject:

Corrected HTML Follows
Code:
<html>
<head>
<title>Kat's Journal</title>
<STYLE TYPE="text/css">
<!-- BODY {scrollbar-DarkShadow-Color: #000000;
scrollbar-Track-Color: #000000;
scrollbar-Face-Color: #000000;
scrollbar-Shadow-Color: #000000;
scrollbar-3dLight-Color: #000000;
scrollbar-Highlight-Color: #000000;
scrollbar-Arrow-Color: #000000;}
-->
</STYLE>
</head>
<body bgcolor="#000000" text="#000000" link="#000000" vlink="#000000" alink="#000000" topmargin="5" bottommargin="0">
<center>
<iframe name="iframe2" src="iframe2.html" frameborder="0" width="722" height="410"></iframe>
</CENTER>
</body>
</html>


This should at least , get you started. when using .css , by standards you should place your sheet between the HEAD tags. You were missing your closing </center> tag also. Just as a note , it's best advised to use an external style sheet and then just call the same stylesheet from each page you wish for the attributes to be on. To do so , create a text file with your style sheet code like so :


In your text file place your code {my example below}
Code:

table {
   font: 9pt "trebuchet ms", arial, sans-serif
}
body {
   color: #333333;
   background-color: #FFFFFF;
   font-family: "trebuchet ms", Arial, sans-serif;
   font-size: 9pt;
   scrollbar-3dlight-color: #7C8893;
   scrollbar-arrow-color: #EEF1F4;
   scrollbar-face-color: #A8A8A8;
   scrollbar-highlight-color: #CDD4DB;
   scrollbar-shadow-color: #7C8893;
   scrollbar-base-color: #FFFFFF;
        scrollbar-track-color: #EEF1F4;
        scrollbar-darkshadow-color: #EEF1F4;
}
p {
   margin-top: 0px;
   margin-bottom: 0px;
   }


Save as mystyle.css

Now call this style sheet from any page you want the same stylesheet to be used on like so:

Code:
<link rel="stylesheet" type="text/css" href="mystyle.css">


You can do this with many scripts like java also , and it is the preferred way.

For example , if you eventually end up with a large , 500 page web-site then you could then apply the same changes to all pages which referenced the particular stylesheet. This makes it simple to make a site-wide change in just minutes.

See if this helped it and let us know something

Cheers,
Danny
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Fri Apr 08, 2005 6:38 am    Post subject:

Awesome Danny, thanks so much for the help. I'll have to try this out in the morning when I get home and I'll come edit this post to let you know if it works.
I had known the part about the scrollbar code needing to be in the head tag, but the place where I used the generator said to put it in the body portion. I think I will use the stylesheet as you suggested also. I have wanted to move certain things to CSS but never had a very firm grasp of how it was coded or worked.
Oh, on the topic of CSS, I thought I would ask real quick to see if this is possible. On my poetry site I have a dropdown menu at the bottom of each poem page. Now each time I add a new poem I have to update over 50 pages of code in order for the new one to show up in the menu on each page. Could I just add that code to a CSS file and update only the one file? Here's a page with the menu http://www.katanya.net/FL.htm
I've been so frustrated with trying to get everything to work how it should that I think I overlooked some of the easy stuff.
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Fri Apr 08, 2005 12:05 pm    Post subject:

Katanya wrote:

Oh, on the topic of CSS, I thought I would ask real quick to see if this is possible. On my poetry site I have a dropdown menu at the bottom of each poem page. Now each time I add a new poem I have to update over 50 pages of code in order for the new one to show up in the menu on each page. Could I just add that code to a CSS file and update only the one file? Here's a page with the menu http://www.katanya.net/FL.htm
I've been so frustrated with trying to get everything to work how it should that I think I overlooked some of the easy stuff.



Very nice.............. could make a man melt

Back to the subject..........I would suggest a php templating system which would be alot easier for you or any single person to manage .
By doing so , you could edit a notepad (*.*php) file and in about 2 minutes you would make an immediate , site wide change . It would also make it an easy solution for you to add new poems on the fly , in an instant .

As this is not my site , I can only try to help you , possibly guide you . But due to the nature of this site as well as respect for the site owner. You might ask James (C.J.) what he would charge to build you a little template.

I just like to help

Cheers,
Danny
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Fri Apr 08, 2005 5:48 pm    Post subject:

PHP has been suggested to me for the poetry site. I haven't gone forward with it because I would have to find someone to design it for me and it would just be a waste of money since I don't write anymore Confused
Moving the scrollbar code to the header didn't seem t fix anything, guess I'll have to try something else.
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Tue Apr 12, 2005 8:18 am    Post subject: The Tiny Template

I'm going to give you a tiny template system.It's a simple one yet highly effecient and easy to learn.Just follow the steps and you'll be alright

Step 1
Our HTML Template
Open notepad and save as all files then name the template template.html
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>mywebsite</title>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=iso-8859-1'>
</head>
<body leftmargin="0" topmargin="0">
    <tr>
      <td valign="top" width="3%">
        <p> </p>
        <p align="center">  </p>
      </td>
        <b>#myreplacementtext#</b>
</body>
</html>


Step 2
[this is where we'll merge our HTML template and our php data]
[save this as mypage.php]
Code:

<?php
include "template.class.php";
$template = new Template;
$template->load("template.html");
$template->replace("myreplacementtext", "put a poem here");
$template->publish();
?>

Step 3
the template class file
save as template.class.php
Code:

<?php
class Template {
   var $template;
   function load($filepath) {
      $this->template = file_get_contents($filepath);
   }
   function replace($var, $content) {
      $this->template = str_replace("#$var#", $content, $this->template);
   }
   function publish() {
      eval("?>".$this->template."<?");
   }
}
?>



a little insight.....


you can place as many of the replace features as you'd like , just add more lines above where this lines is:
$template->replace("myreplacementtext", "put a poem here");
like so........
$template->replace("myreplacementtext2", "put another poem here");
$template->replace("myreplacementtext3", "put a poem here");
and so on.................

do be aware that you may not use an double Quote(") within the "put a poem here" section , only the outers may be present.

It is really simple to use because you'll build your page in a regular HTML enviroment. but it allows you to change the data as necessary

hope it helped;)

Cheers,
Danny
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Tue Apr 12, 2005 8:25 am    Post subject:

Thanks Danny, I'll try working on this as soon as I figure out the scrolling/freeze issue. I have a feeling it may take me a while.
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Tue Apr 12, 2005 8:34 am    Post subject:

Code:

<IFRAME frameborder="0" scrolling="yes" width="123" height="16"
SRC="FILENAME.PL" name="FILENAME" style="color: #FF6600; border-style: double; border-width:3; background-color: #808000" align="middle">
</IFRAME>


is your code similiar?
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Tue Apr 12, 2005 3:55 pm    Post subject:

There are two separate iframes apparently (I did not make the layout myself). The codes are as follows:
On index2.html
Code:
<iframe name="iframe2" src="iframe2.html" frameborder="0" width="722" height="410"></iframe>

On iframe2.html
Code:
<iframe name="iframe" src="iframe.html" width="359" height="337" ALLOWTRANSPARENCY="true" style="filter:chroma(color=colorcode)" frameborder="0" target="_self"></iframe>


Should I change it to be more in line with the code snippet you posted?
Back to top
PHPDUMMY
CJ-Design.com Moderator



Joined: 09 Mar 2005
Posts: 495
Location: South East Kentucky,U.S.A.

Posted: Tue Apr 12, 2005 8:44 pm    Post subject:

Katanya wrote:

Should I change it to be more in line with the code snippet you posted?


The code should look more like the snippet that I showed.

Why is there 2 iFrames ?


I guess it should look more like the following;
Code:
<IFRAME frameborder="0" scrolling="yes" width="722" height="410"
SRC="iframe2.html" name="iframe2" style="color: #FF6600; border-style: double; border-width:3; background-color: #808000" align="middle">
</IFRAME>


Code:


<IFRAME frameborder="0" scrolling="yes" width="359" height="337"
SRC="iframe.html" name="iframe" ALLOWTRANSPARENCY="true" style="filter:chroma(color=colorcode)" align="middle" target="_self">
</IFRAME>


Cheers,
Danny
Back to top
Katanya



Joined: 28 Mar 2005
Posts: 17
Location: Colorado

Posted: Thu Apr 14, 2005 9:23 am    Post subject:

I have no idea why there are two iframes to tell you the truth (not my coding). The one called for from the index page is where the links on the layout and the images are broken out, and the one called for from that page is the main page content.
Back to top
Display posts from previous:   
       CJ Webmaster Forums Forum Index » Other Languages All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional, Mods by CJ Website Design