Hello Everyone,
I like many people am being challenged by the cross-browser phenomena. Currently I have developed a script that centers page elements in the middle of the screen. The code works fine in IE6+. However when it is run in NN6+
and in Pheonix it doesn't work as expected by overlapping page elements. These same elements are being correctly placed with IE.
I have checked for errors in the JavaScript and NN6 cannot find anything obviously wrong with the code even though it doesn't display the page the way I would like it to. On the other hand in addition to not displaying as desired, the Pheonix browser lists the following concerns:
Error: setPrimaryElement is not defined
Source File: file:///F:/New%20FernGully%20Pages/Craft%20Stamps%20Templates/Version%202/html/CraftStampsTemplate.htm
Line: 36
Error: setSecondaryElement is not defined
Source File: file:///F:/New%20FernGully%20Pages/Craft%20Stamps%20Templates/Version%202/html/CraftStampsTemplate.htm
Line: 100
These two errors lead me to believe that I am not calling my script correctly from within the main html page. I am under the impression that IE6+ NS6+ and Pheonix all support an identical DOM, at least that is the result I obtain from running an object detection script.
The script I have created relies upon each page element being given a unique identifier. This I have achieved by using style sheets, the pertinent css info follows:
<style type="text/css">
#craftStampContainer
{
position: absolute;
height: 328px;
width: 322px;
}
#shoppingCartContainer
{
position: relative;
height: 500px;
width: 400px;
}
</style>
These styles are used to identify <div> elements that are dynamically positioned with the following calling functions.
<script language="javascript" type="text/javascript">
setPrimaryElement('craftStampContainer',328, 322, 1, "#ffffff");
</script>
<script language="javascript" type="text/javascript">
setSecondaryElement('shoppingCartContainer', 500, 400, 1, "#ffffff");
</script>
The information given in the calling function is:
* The page elements identifier
* The height of the page element
* The width of the page element
* The Z-Index of the element
* The background colour of the <div> page element
I figure that there must be a variation in the manner that NN and Pheonix deal with css or calling javascript from within an html page. However I am at a loss as to what is causing the odd behaviour. Any ideas will be greatly appreciated.
I have successfully tested a sister script to this on all browsers, the sister script successfully centers one page element on all of the afore mentioned browsers.
Thanks for your time
Regards
David
I like many people am being challenged by the cross-browser phenomena. Currently I have developed a script that centers page elements in the middle of the screen. The code works fine in IE6+. However when it is run in NN6+
and in Pheonix it doesn't work as expected by overlapping page elements. These same elements are being correctly placed with IE.
I have checked for errors in the JavaScript and NN6 cannot find anything obviously wrong with the code even though it doesn't display the page the way I would like it to. On the other hand in addition to not displaying as desired, the Pheonix browser lists the following concerns:
Error: setPrimaryElement is not defined
Source File: file:///F:/New%20FernGully%20Pages/Craft%20Stamps%20Templates/Version%202/html/CraftStampsTemplate.htm
Line: 36
Error: setSecondaryElement is not defined
Source File: file:///F:/New%20FernGully%20Pages/Craft%20Stamps%20Templates/Version%202/html/CraftStampsTemplate.htm
Line: 100
These two errors lead me to believe that I am not calling my script correctly from within the main html page. I am under the impression that IE6+ NS6+ and Pheonix all support an identical DOM, at least that is the result I obtain from running an object detection script.
The script I have created relies upon each page element being given a unique identifier. This I have achieved by using style sheets, the pertinent css info follows:
<style type="text/css">
#craftStampContainer
{
position: absolute;
height: 328px;
width: 322px;
}
#shoppingCartContainer
{
position: relative;
height: 500px;
width: 400px;
}
</style>
These styles are used to identify <div> elements that are dynamically positioned with the following calling functions.
<script language="javascript" type="text/javascript">
setPrimaryElement('craftStampContainer',328, 322, 1, "#ffffff");
</script>
<script language="javascript" type="text/javascript">
setSecondaryElement('shoppingCartContainer', 500, 400, 1, "#ffffff");
</script>
The information given in the calling function is:
* The page elements identifier
* The height of the page element
* The width of the page element
* The Z-Index of the element
* The background colour of the <div> page element
I figure that there must be a variation in the manner that NN and Pheonix deal with css or calling javascript from within an html page. However I am at a loss as to what is causing the odd behaviour. Any ideas will be greatly appreciated.
I have successfully tested a sister script to this on all browsers, the sister script successfully centers one page element on all of the afore mentioned browsers.
Thanks for your time
Regards
David