Adding code

User 1993094 Photo


Registered User
1 post

I tried to add javascript code to a cell within my table and the code I added went to the bottom of my page. When I went back to the code from the preview the code was in the correct place but for some reason it jumped to the bottom of the page table. Please....any ideas why the code did not stay where I put it in the code design area?
User 122279 Photo


Senior Advisor
14,465 posts

Is this some js that you have written yourself, or does it come from somewhere. If the latter, does it come with instructions about where to place it?

If we could see the page in question, it would be easier to help. Got a URL for us?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 3004957 Photo


Registered User
851 posts

Are you adding it in code view or visual design view? If in code view, the script code must have the right syntax or it will just show up as text in the page. As a script, is shouldn't render at all, that is, it shouldn't be visible to the viewer.

Dave.
User 2009412 Photo


Registered User
2 posts

Hi,
I urgently need a code or script? to place I think in the Head section of my web page.

This script or code is a muli browser or cross browser, it allows my web page to be seen correctly in most of the browsers such as IE, Navegator, Safari, and others.

At the moment it is only showing correctly in Firefox, and please can you tell me exactly where I place it in the html.

I would be very greatful for help in this matter.
User 364143 Photo


Guest
5,410 posts

You are kidding right?
CoffeeCup... Yeah, they are the best!
User 562592 Photo


Registered User
2,038 posts

No I dont think he is.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 476017 Photo


Ambassador
375 posts

Edmund Roberts wrote:
Hi,
I urgently need a code or script? to place I think in the Head section of my web page.

This script or code is a muli browser or cross browser, it allows my web page to be seen correctly in most of the browsers such as IE, Navegator, Safari, and others.

At the moment it is only showing correctly in Firefox, and please can you tell me exactly where I place it in the html.

I would be very greatful for help in this matter.


Whats your website url so we can see your problem!!
Dave Butler
Yorkshire
England

Old Rishworthians Rugby Union Football club http://www.orrufc.co.uk
Tuxedo Junction Yorkshire Function Band http://www.riley-tuxedojunction.co.uk
The Commons Guest House http://www.thecommons-guesthouse.co.uk
all created with Coffee Cup html editor
User 562592 Photo


Registered User
2,038 posts

Edmund, sorry we are just having a little fun. Cross-browser compliance is something that can only be achieved through your styles. Being compatible across browsers is usually the hardest thing for a web developer to do (hence the humor). It is way too complicated of a subject to cover here, but the only quick answer to your question would be to use CC's html editor. In the editor click File > New from layout. From here select a layout. These layouts are cross browser. :D
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 38401 Photo


Senior Advisor
10,951 posts

Actually guys, there is are small bits of script that sites can use to make some browsers see things differently. There are also entries for CSS that do the same thing, mulitple settings for the same attribute that are read by specific browsers. :P

One of the things that I've used ever since I think either Cary or Inger or someone else (sorry it's a long time ago lol) gave me to put in my page was this:

<!--[if IE]>
<style type="text/css">
/* #navigation, #content, #extra { margin-top: 20px; } */
</style>
<![endif]-->

This goes inside the <Head> area of your site, and I'm assuming adjusts the top margin to accomodate IE. What I don't know is if this was given to me specifically for "my" theme or if it's a general thing lol. Try it and see I guess, but it is probably for themes that contain the areas within that code such as #navigation, #content, #extra which my theme all contains.

That's the only example I have at the moment, maybe there are others that other people have too :)

Eric English wrote:
Edmund, sorry we are just having a little fun. Cross-browser compliance is something that can only be achieved through your styles. Being compatible across browsers is usually the hardest thing for a web developer to do (hence the humor). It is way too complicated of a subject to cover here, but the only quick answer to your question would be to use CC's html editor. In the editor click File > New from layout. From here select a layout. These layouts are cross browser. :D


Eric is correct here on the rest, it's done through rigorous coding and double checking the browsers to see how it comes out on the rest. Right now I basically only check it in IE8 and FF 3.6 as they are all I have installed, but maybe today or tomorrow I'll install Chrome and something else dunno what yet lol.
User 562592 Photo


Registered User
2,038 posts

Jo Ann wrote:
Actually guys, there is are small bits of script that sites can use to make some browsers see things differently. There are also entries for CSS that do the same thing, mulitple settings for the same attribute that are read by specific browsers. :P

One of the things that I've used ever since I think either Cary or Inger or someone else (sorry it's a long time ago lol) gave me to put in my page was this:

<!--[if IE]>
<style type="text/css">
/* #navigation, #content, #extra { margin-top: 20px; } */
</style>
<![endif]-->


This goes inside the <Head> area of your site, and I'm assuming adjusts the top margin to accomodate IE. What I don't know is if this was given to me specifically for "my" theme or if it's a general thing lol. Try it and see I guess, but it is probably for themes that contain the areas within that code such as #navigation, #content, #extra which my theme all contains.

That's the only example I have at the moment, maybe there are others that other people have too :)



This can be used with any theme. But, it is a style type - hence the CSS. This does not make your page "cross browser" as much as it sets the margins even between ie and mozilla. Its like Eric Meyers reset style.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.