9 replies [Last post]
Grizz
Grizz's picture
Offline
newbie
Last seen: 16 years 22 weeks ago
Joined: 2005-01-24
Posts: 6
Points: 0

Hi All,

I am constructing a new tableless website in css. I have a javascript file to put in page, but when added, it does something weird in all browsers, opera is the worst of coarse.

I cannot edit the javascript, it comes from another site, went to their site and it works in all browsers but they used tables. I've tried several edits, nothing works.

Here is a link to the page without the script, and on the page a link to what it does when script is added. http://fpwm.lazykatz.com/blue/new_page_3aaaa.htm Page has been validated.

There is several issues posted on the page in need of help, I've managed to fix all but the javascript and light purple box not setting flush in Ex-plorer.

Thankz All in advanze,
Grizz

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 24 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

how do I insert javascript..

Grizz, no offence but this is really a forum for discussing CSS problems, not javascript.

I'll move this thread to the 'Off Topic' area .

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Grizz
Grizz's picture
Offline
newbie
Last seen: 16 years 22 weeks ago
Joined: 2005-01-24
Posts: 6
Points: 0

how do I insert javascript..

No offense Hugo.. I think this is a css issue. All I asked was how to set up or edit the css to insert a javascript, without messing up the page that is built with css. The javascript works find outside the css, all goes bonkers when inserted in page with css.

Grizz

Anonymous
Anonymous's picture
Guru

Re: how do I insert javascript..

Grizz wrote:
http://fpwm.lazykatz.com/blue/new_page_3aaaa.htm Page has been validated.

Ask anybody, I always check when people say that.

http://validator.w3.org/check?uri=http%3A%2F%2Ffpwm.lazykatz.com%2Fblue%2Fnew_page_3aaaa.htm

Looking at the web page now. Smile

I really don't know what you want the script to do differently so I can't really help you with it.

antibland
antibland's picture
Offline
Leader
Pittsburgh
Last seen: 12 years 24 weeks ago
Pittsburgh
Joined: 2005-01-17
Posts: 603
Points: 0

how do I insert javascript..

Grizz,

Can you be more specific? What Javascript snippet isn't working? How is it failing?

If I need to insert Javascript code into my page (between the body tags) then I do something like this:

<p>Some content here to fill up space for the example</p>
<script type="text/javascript" src="someFile.js"></script>
<p>Some more content here to fill up space for the example</p>

If I don't need javascript from within the body, I call it from an external file between the head tags.
...
<head>
<script type="text/javascript" src="somefile.js"></script>
</head>
...

The only problems I've encountered with this is that, in IE6/WinXP, once in a while the content beneath the <script> tags used in the body would get obscured or covered somehow by the content from the javascript file. Changing the z-index over the covered element didn't rectify the problem, either. I had to put the code directly in the page and avoid the external file entirely. If this isn't what you're looking for answer-wise, then please define your problem more clearly as I'm glad to help.

Andrew

Grizz
Grizz's picture
Offline
newbie
Last seen: 16 years 22 weeks ago
Joined: 2005-01-24
Posts: 6
Points: 0

how do I insert javascript..

I am creating a new tableless website, and the javascript in question, when inserted, didn't work properly. So after numberous edits to the page and CSS to no prevail, I used an i-frame and it solved the issue. Opera still reduces font in that cell, but is livalbe because it use to destroy everything on page.

http://fpwm.lazykatz.com/blue/new_page_44.htm

I-frame may have been a resolution, I didn't want to us it because my current site, http://lazykatz.com, has multiple i-frames, goal was to eliminate them, so I am still looking for a way to do this with CSS.

I posted in the CSS section of this forum, and it was moved to here, when in my opinion, it is a CSS issue. So if anyone knows how to accomplish this without an i-frame using CSS, I would appreciate it.

Grizz

Anonymous
Anonymous's picture
Guru

how do I insert javascript..

antibland
antibland's picture
Offline
Leader
Pittsburgh
Last seen: 12 years 24 weeks ago
Pittsburgh
Joined: 2005-01-17
Posts: 603
Points: 0

how do I insert javascript..

Although you didn't come here with validation questions, certain errors could be causing strange behaviors. A few that I noticed at a cursory glance are:

1) <a> tags that are not opened (near Contact Us)
2) <form> tags missing the action and name attributes
3) <form> tag with a target="_blank". I'm pretty sure that this is not a legal attribute here.
4) [b] tags that should be <strong>. The reason is that screen-readers can't interpret [b]. <strong> implies a more general style that aural readers and browsers understand.
note: (I wrote [b] this way so this board wouldn't apply boldness to the text; you know what i mean though)

The biggest problems I noticed were unopened/unclosed tags. Do yourself a favor and get this thing validated. It's a bigger deal than you may think. Some of your problems may just go away. Once you do that, come on back and we'll zap the rest of your problems as best we can.

Andrew

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 24 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

how do I insert javascript..

Be specific then, why do you believe it's a CSS issue? I moved it as that was my determination, I still do not see why it's an css issue.
It has been pointed out to you that there are a number of markup errors some of which will cause problems and that need to sorted.

When asking for help it it's important to describe exactly what you think is wrong and what you have attempted by way of fixing it. This aid us in focussing in on the correct area. vagueness is definitely not a help

Even if you disagree with my discission it's probably best not to harp on about it Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Grizz
Grizz's picture
Offline
newbie
Last seen: 16 years 22 weeks ago
Joined: 2005-01-24
Posts: 6
Points: 0

how do I insert javascript..

Quote:
Even if you disagree with my discission it's probably best not to harp on about it
Not harping, just frustrated with this reconstruction nightmare, I apologize.

I am not one to ask for help, but I usually jump to help others. My 1st post in this forum was Jan. 24th with this page in question, http://fpwm.lazykatz.com/blue/ After alot of searching, trial/error, tutorials, and hand coding instead of using FP, I think I'm on the right path to get this nightmare to go away.

Quote:
It has been pointed out to you that there are a number of markup errors
23 errors, most were for forms that were not complete, only had the input fields on page for sizing purposes. I cleaned it up, XHTML validates: http://validator.w3.org/check?uri=http%3A%2F%2Ffpwm.lazykatz.com%2Fblue%2Fnew_page_44.htm and I will from now on, validate everything before posting.

Quote:
4) [b] tags that should be <strong>. The reason is that screen-readers can't interpret [b]. <strong> implies a more general style that aural readers and browsers understand.
Thanks antibland, that is my next task to make everything assessable as well.

Now can anyone tell me if there is a way to add javascript to a tableless page without using an i-frame.

Thankz in Advanze,
Grizz