Support Forum » Mac OS X

Design view not working in paid edition

(2 posts)

  1. Style Master was working great in demo mode. It ran out, so I purchased it. Now, in the design window, I don't see a wysiwyg view, and this javascript is dumped in.

    ~~~~~~~~~~~~~
    From looking at other posts, I've tried to empty the html element, that doesn't fix it. Here's the top of the page prior to the <body> tag

    ~~~~~~~~~~~

    <script language="javascript">
    <!--

    function setRuleProperties(theStatementIndex, theProperties, styleSheetURL) {

    if (!document.styleSheets) return;
    var theStyleSheet;

    //the following is perhaps the big problem with this approach
    //t might be better to simply step through and find the first statement with a selector that matches the one we want (so pass in the selector, not an index) and then change that statement

    for (i = 0; i < document.styleSheets.length; i++) {
    if (document.styleSheets[i].href==styleSheetURL)
    {
    theStyleSheet=document.styleSheets[i]; //still need to handle embedded style sheets
    break;
    }

    else if ((!document.styleSheets[i].href) && (styleSheetURL==""))
    {
    theStyleSheet=document.styleSheets[i]; //still need to handle embedded style sheets
    break;
    }
    }

    if (theStyleSheet.cssRules)
    theRules = theStyleSheet.cssRules
    else if (theStyleSheet.rules)
    theRules = theStyleSheet.rules
    else return;

    theRules[theStatementIndex-1].style.cssText=theProperties

    }

    var LastOutlineStyle;
    var LastOutlineWidth;
    var LastOutlineColor;

    var blingOutline='2px #00ff00 solid'; //can be set be Style Master based on preferences

    var lastselectorIndex;
    var laststyleSheetURL;

    function outlineMatching(theSelector) {
    //this shows any element which is absolutely positioned by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument

    var theRule;
    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {

    //walk through each style shheet in the document
    theRule=FindRule(document.styleSheets[i], theSelector);
    if (theRule) {
    break;
    }
    }

    if (!theRule) return;

    //save the last outline values from this statement to be restored
    LastOutlineStyle=theRule.style.outlineStyle;
    LastOutlineWidth=theRule.style.outlineWidth;
    LastOutlineColor=theRule.style.outlineColor;

    //now we 'bling' the statement by changing the outline of it - would be an improvement to make the value a parameter that could be sent by Style Master
    theRule.style.outline = blingOutline;
    //alert(theRule.style.cssText);

    }

    function clearOutlineMatching(theSelector) {
    //this shows any element which is absolutely positioned by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument

    var theRule;
    var theSelectors;
    var theHrefs;
    theSelectors="";
    theHrefs="";
    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {

    //walk through each style sheet in the document
    theRule=FindRule(document.styleSheets[i], theSelector);
    if (theRule) {
    break;
    }
    }

    if (!theRule) return;

    //restore the saved values when we blinged the element
    theRule.style.outlineStyle = LastOutlineStyle;
    theRule.style.outlineWidth = LastOutlineWidth;
    theRule.style.outlineColor = LastOutlineColor;

    }

    //*** This code is copyright 2003-2004 by Gavin Kistner, gavin@refinery.com
    //*** It is covered under the license viewable at http://phrogz.net/JS/_ReuseLicense.txt
    //*** Reuse or modification is free provided you abide by the terms of that license.
    //*** (Including the first two lines above in your source code mostly satisfies the conditions.)

    // Find the CSS rule by its selector text.
    // e.g. FindRule(document.styleSheets[0],'a.selected').style.fontWeight='bold';
    function FindRule(ss,selText){
    if (!ss) return;
    if (ss.cssRulesCache==null) ss.cssRulesCache={};
    var cache=ss.cssRulesCache;

    //screw case sensitivity; IE and Mozilla don't agree on case for elements themselves
    selText=selText.toLowerCase();

    if (cache[selText]) return cache[selText];
    var rules = ss.cssRules || ss.rules;
    for (var i=0,len=rules.length;i<len;i++){
    var rule=rules[i], ruleSelText = rule.selectorText;

    // Clean up Safari's weirdness
    ruleSelText = ruleSelText.replace(/\.(\w+)\[CLASS~="\1"\]/g,'.$1').replace(/\[ID"([^"]+)"\]/g,'#$1');

    // Clean up IEMac's weirdness
    ruleSelText = ruleSelText.replace(/\*([.#])/g,'$1');

    //screw case sensitivity; IE and Mozilla don't agree on case for elements themselves
    ruleSelText = ruleSelText.toLowerCase();

    if (ruleSelText==selText) return (cache[selText]=rules[i]);
    }
    return null;
    }

    //-------- end of bling code

    function blingElement(selectorIndex, styleSheetURL)
    {

    // called directly by Style Master

    //bling is a very important part of style master 4, and the reason i started messing round with all this JS
    //here is what it is and does
    //when a user selects a statement in Style Master, I want to show all of the elements in the preview document which are directly selected by the statement
    //style master calls thish function, along with the index of the statement and the url for the stylesheet
    //in windows this is done completely differently, and much better, by adding a rule using AddRule
    //AFAIK, AddRule is not supported in Safari/WebKit?
    //So I do it like this

    //It would be nice if there were much simpler ways of doing this

    clearElementSelection(LastSelectedElt);
    //clears the outline from around the currently selected element

    laststyleSheetURL=styleSheetURL;
    lastselectorIndex=selectorIndex;
    //save these so we can undo the last bling whenever we need to

    if (!document.styleSheets) return;
    var theStyleSheet;

    //the following is perhaps the big problem with this approach
    //t might be better to simply step through and find the first statement with a selector that matches the one we want (so pass in the selector, not an index) and then change that statement

    //theStyleSheet=document.styleSheets[0]; //still need to handle embedded style sheets
    theStyleSheet=document.styleSheets[document.styleSheets.length-1]; //we do the last style sheet - as we always add our style sheets at the end

    if (theStyleSheet.cssRules)
    theRules = theStyleSheet.cssRules
    else if (theStyleSheet.rules)
    theRules = theStyleSheet.rules
    else return;

    //save the last outline values from this statement to be restored
    LastOutlineStyle=theRules[selectorIndex-1].style.outlineStyle;
    LastOutlineWidth=theRules[selectorIndex-1].style.outlineWidth;
    LastOutlineColor=theRules[selectorIndex-1].style.outlineColor;

    //now we 'bling' the statement by changing the outline of it - would be an improvement to make the value a parameter that could be sent by Style Master
    theRules[selectorIndex-1].style.outline = blingOutline;

    }

    function unBlingElement(statementIndex, styleSheetURL)
    {

    // called directly by Style Master

    // see blingElement for an explanation of the unusual name
    // this removes the added outline values, and replaces the with previous ones for the 'blinged' elements
    //styleSheetURL specifies the URL of the style sheet that thi applied to
    //statementIndex specifies the index of the statement that was 'blinged'

    //there is still a problem that if the style sheet is embedded, or imported then we don't handle that

    if (laststyleSheetURL==null) return;

    if (!document.styleSheets) return;

    var theStyleSheet;

    theStyleSheet=document.styleSheets[document.styleSheets.length-1]; //still need to handle embedded style sheets

    if (theStyleSheet.cssRules)
    theRules = theStyleSheet.cssRules
    else if (theStyleSheet.rules)
    theRules = theStyleSheet.rules
    else return;

    //restore the saved values when we blinged the element
    theRules[statementIndex-1].style.outlineStyle = LastOutlineStyle;
    theRules[statementIndex-1].style.outlineWidth = LastOutlineWidth;
    theRules[statementIndex-1].style.outlineColor = LastOutlineColor;

    }

    var smReturnValue //Style Master uses getsmReturnValue to collect values to be used - Mac only
    var LastClickedElementStyle //stores the style information for the last clicked element
    var LastClickedElementHTML //stores the HTML of the last clicked element
    var theAncestors //used to get the acestors of an element recursively, because Javascript has no ByRef variables
    var clickedElementInfo //stores
    var cMMClickedElementInfo
    var mouseOverElementInfo

    function getElementInfo(TheElt) {
    //clears the return value then calls extract to put the value for the element in smReturnValue
    smReturnValue="";
    LastClickedElementStyle="";
    LastClickedElementHTML="";
    extractElementInfo(TheElt);
    GetElementComputedStyle(TheElt);
    GetElementHTML(TheElt);

    }

    function extractElementInfo(TheElt)
    {
    //takes the element and gets the nodename, class, ID, and ancestors, and then does the same for its parent
    //this is recursive until the document element

    //the global variable mouseOverElementInfo is used to store this info
    //the format of the variable is each elements info is separated by a %% and the individual values by /

    //works fine and you can probably ignore it

    smReturnValue=smReturnValue + TheElt.nodeName;

    if (TheElt.className=="")
    smReturnValue=smReturnValue + "/*"
    else
    smReturnValue=smReturnValue + "/" + TheElt.className;

    if (TheElt.id=="")
    smReturnValue=smReturnValue + "/*"
    else
    smReturnValue=smReturnValue + "/" + TheElt.id;

    theAncestors="";
    getAncestors(TheElt);
    smReturnValue=smReturnValue + "/" + theAncestors;

    if (TheElt.parentNode == document){
    //alert(smReturnValue);
    return;
    }

    smReturnValue=smReturnValue + "%%";
    extractElementInfo(TheElt.parentNode);
    //

    //just save the return value in the var smReturnValue, then SM can get if from there
    }

    function getAncestors(AnElt) {
    //get the ancestors of the element
    // called recursively and the name of the current element is added to the list stored in the global variable theAncestors

    if (AnElt.parentNode == document) return;

    theAncestors= AnElt.nodeName+ " " + theAncestors;
    getAncestors(AnElt.parentNode, theAncestors);

    }

    function getclickedElementInfo() {
    // called directly by Style Master

    return smReturnValue;
    }

    function getClickedElementStyle() {
    // called directly by Style Master

    return LastClickedElementStyle;
    }

    function getClickedElementHTML() {
    // called directly by Style Master

    return LastClickedElementHTML;
    }

    function getCMMClickedElementInfo() {
    return cMMClickedElementInfo;
    }

    function getMouseOverElementInfo() {
    return mouseOverElementInfo;
    }

    var wasCMMClick

    function getWasCMMClick() {
    // called directly by Style Master

    return wasCMMClick
    }

    function clearCMMClickedElementInfo() {
    // called directly by Style Master

    cMMClickedElementInfo="";
    wasCMMClick=""
    }

    function getMouseOverInfo(TheElt)
    {
    //takes the element and gets the nodename, class, ID, and ancestors, and then does the same for its parent
    //this is recursive until the document element

    //the global variable mouseOverElementInfo is used to store this info
    //the format of the variable is each elements info is separated by a %% and the individual values by /

    mouseOverElementInfo=mouseOverElementInfo + TheElt.nodeName;

    if (TheElt.className=="")
    mouseOverElementInfo=mouseOverElementInfo + "/*"
    else
    mouseOverElementInfo=mouseOverElementInfo + "/" + TheElt.className;

    if (TheElt.id=="")
    mouseOverElementInfo=mouseOverElementInfo + "/*"
    else
    mouseOverElementInfo=mouseOverElementInfo + "/" + TheElt.id;

    theAncestors="";
    getAncestors(TheElt);
    mouseOverElementInfo=mouseOverElementInfo + "/" + theAncestors;

    if (TheElt.parentNode == document){
    return;
    }

    mouseOverElementInfo=mouseOverElementInfo + "%%";
    getMouseOverInfo(TheElt.parentNode);

    //just save the return value in the var mouseOverElementInfo, then SM can get if from there
    }

    function getCMMElementInfo(TheElt)
    {
    //takes the element and gets the nodename, class, ID, and ancestors, and then does the same for its parent
    //this is recursive until the document element

    //the global variable cMMClickedElementInfo is used to store this info
    //the format of the variable is each elements info is separated by a %% and the individual values by /

    cMMClickedElementInfo=cMMClickedElementInfo + TheElt.nodeName;

    if (TheElt.className=="")
    cMMClickedElementInfo=cMMClickedElementInfo + "/*"
    else
    cMMClickedElementInfo=cMMClickedElementInfo + "/" + TheElt.className;

    if (TheElt.id=="")
    cMMClickedElementInfo=cMMClickedElementInfo + "/*"
    else
    cMMClickedElementInfo=cMMClickedElementInfo + "/" + TheElt.id;

    theAncestors="";
    getAncestors(TheElt);
    cMMClickedElementInfo=cMMClickedElementInfo + "/" + theAncestors;

    if (TheElt.parentNode == document){
    return;
    }

    cMMClickedElementInfo=cMMClickedElementInfo + "%%";
    getCMMElementInfo(TheElt.parentNode);

    //just save the return value in the var cMMClickedElementInfo, then SM can get if from there
    }

    //----------

    // these functions show and hide elements based on positioning or other property values
    // together, they are part of what we call "X-RAY"

    function showAbsolute() {
    //this shows any element which is absolutely positioned by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument

    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {
    //walk through each style shheet in the documeny
    var theRules = new Array();
    theRules = document.styleSheets[i].cssRules

    //show the absolute elements
    //for each rule in the current style sheet, look for any with aposition value of 'absolute' and give it the outline value
    for (j = 0; j < theRules.length; j++) {
    if (theRules[j].style.position == 'absolute') {
    theRules[j].style.outlineStyle = 'dotted 2px #00f';
    }
    }
    }
    }

    function clearAbsolute() {
    //this shows any element which is absolutely positioned by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument

    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {
    //walk through each style shheet in the documeny
    var theRules = new Array();
    theRules = document.styleSheets[i].cssRules

    //show the absolute elements
    //for each rule in the current style sheet, look for any with aposition value of 'absolute' and give it the outline value
    for (j = 0; j < theRules.length; j++) {
    if (theRules[j].style.position == 'absolute') {
    theRules[j].style.outlineStyle = '';
    }
    }
    }
    }

    function showFloated()
    {

    // called directly by Style Master

    //this shows any element which is floated by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument
    // the mechanism is in effect the same as showAbsolute

    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {
    var theRules = new Array();
    theRules = document.styleSheets[i].cssRules

    //show the absolute elements
    for (j = 0; j < theRules.length; j++) {
    if (theRules[j].style.cssFloat == 'left') {
    theRules[j].style.outline = 'dotted 2px #f00';
    }

    if (theRules[j].style.cssFloat == 'right') {
    theRules[j].style.outline = 'dotted 2px #f00';
    }
    }
    }
    }

    function clearFloated()
    {

    // called directly by Style Master

    //this shows any element which is floated by giving it an outline
    //it would be good to improve this by allowing the outline value to be passed as an argument
    // the mechanism is in effect the same as showAbsolute

    if (!document.styleSheets) return;

    for (i = 0; i < document.styleSheets.length; i++) {
    var theRules = new Array();
    theRules = document.styleSheets[i].cssRules

    //show the absolute elements
    for (j = 0; j < theRules.length; j++) {
    if (theRules[j].style.cssFloat == 'left') {
    theRules[j].style.outlineStyle = '';
    }

    if (theRules[j].style.cssFloat == 'right') {
    theRules[j].style.outlineStyle = '';
    }
    }
    }
    }
    //---------
    // event handlers

    window.onload=installEventHandlers
    //installs a click handler for every element

    function installEventHandlers() {

    //installs handlers for clicking, mouseover and contextual menu clicking

    allElts=document.getElementsByTagName("*");

    for (var i=0;i<allElts.length;i++)
    {
    allElts[i].onclick = clickHandler;
    allElts[i].oncontextmenu = CMMClickHandler;
    allElts[i].onmouseover = mouseOverHandler;
    }

    }

    var lastCMMElement="";
    var lastMouseOverElement="";

    function clickHandler(e)
    {

    clickElement(e);
    return false; //this stops us following links, etc.
    }

    function mouseOverHandler(e)
    {

    mouseOverElementInfo="";
    if (!e) var e = window.event;
    if (e.target) var tg = e.target;
    else if (e.srcElement) var tg = e.srcElement;

    while (tg.nodeName == '#text')
    tg = tg.parentNode;

    getMouseOverInfo(tg); //store the info for the element in the gloabal var mouseOverElementInfo

    lastMouseOverElement=mouseOverElementInfo;
    return false;
    }

    function CMMClickHandler(e)
    {

    clickElement(e);

    wasCMMClick="TRUE"
    window.defaultStatus="TRUE";

    return false;
    }

    var LastSelectedElt;
    var lastSelectedOutlineStyle;
    var lastSelectedOutlineWidth;
    var lastSelectedOutlineColor;
    function clickElement(e) {
    //called by the click handler when an element is clicked

    clearElementSelection(LastSelectedElt); //clears the last selected element outline
    unBlingElement(lastselectorIndex, laststyleSheetURL); //removes the outline around the last "blinged" element

    if (!e) var e = window.event;
    if (e.target) var tg = e.target;
    else if (e.srcElement) var tg = e.srcElement;
    while (tg.nodeName == '#text')
    tg = tg.parentNode;

    getElementInfo(tg); //store the info for the element in smReturnValue

    if (showMatchingElements=='false') return; //no need to show the selected element

    showElementSelection(tg)

    }

    //this is for showing and clearing the outline around an element when it is clicked

    function clearElementSelection(theSelectedElement) {

    if(theSelectedElement) {
    theSelectedElement.style.outlineStyle=lastSelectedOutlineStyle;
    theSelectedElement.style.outlineWidth=lastSelectedOutlineWidth;
    theSelectedElement.style.outlineColor=lastSelectedOutlineColor;
    }

    }

    function showElementSelection(theSelectedElement) {

    if(theSelectedElement) {
    // store this element as the last selected one, and its outline values to be restored by clearElementSelection
    LastSelectedElt=theSelectedElement;
    lastSelectedOutlineStyle=theSelectedElement.style.outlineStyle;
    lastSelectedOutlineWidth=theSelectedElement.style.outlineWidth;
    lastSelectedOutlineColor=theSelectedElement.style.outlineColor;

    theSelectedElement.style.outline='solid thin orange';
    }

    }

    //-------- this part manages whether or not eleemnts are shown when selected with mouse click

    function showSelected(showOrHide) {
    // called directly by Style Master

    //sets whether or not selected elements should be shown when clicked

    showMatchingElements=showOrHide;

    if(showOrHide=='false') {
    //turn off the outline for the currently selected element if any
    if (LastSelectedElt) {
    LastSelectedElt.style.outlineStyle=lastSelectedOutlineStyle;
    LastSelectedElt.style.outlineWidth=lastSelectedOutlineWidth;
    LastSelectedElt.style.outlineColor=lastSelectedOutlineColor;

    }
    }
    }

    showMatchingElements="true" //by default we set this value to true
    //this is set by Style Master when it calles showSelected

    function getYScroll() {
    return document.body.scrollTop
    }

    function setYScroll(yScroll) {
    document.body.scrollTop=yScroll
    }

    function GetElementComputedStyle(element) {

    //this is a non obfuscated way of doing this

    CSSDec=document.defaultView.getComputedStyle(element,"");

    ComputedStyle=CSSDec.getPropertyValue("color") + "!!" + "color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-size") + "!!" + "font-size";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-weight") + "!!" + "font-weight";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-style") + "!!" + "font-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-family") + "!!" + "font-family";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-stretch") + "!!" + "font-stretch";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("text-decoration") + "!!" + "text-decoration";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("letter-spacing") + "!!" + "letter-spacing";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("word-spacing") + "!!" + "word-spacing";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("text-indent") + "!!" + "text-indent";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("vertical-align") + "!!" + "vertical-align";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("line-height") + "!!" + "line-height";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("font-variant") + "!!" + "font-variant";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("text-transform") + "!!" + "text-transform";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-color") + "!!" + "background-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-image") + "!!" + "background-image";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-repeat") + "!!" + "background-repeat";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-attachment") + "!!" + "background-attachment";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-scroll") + "!!" + "background-scroll";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("background-position") + "!!" + "background-position";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("margin") + "!!" + "margin";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("margin-top") + "!!" + "margin-top";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("margin-left") + "!!" + "margin-left";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("margin-bottom") + "!!" + "margin-bottom";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("margin-right") + "!!" + "margin-right";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("padding") + "!!" + "padding";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("padding-top") + "!!" + "padding-top";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("padding-left") + "!!" + "padding-left";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("padding-bottom") + "!!" + "padding-bottom";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("padding-right") + "!!" + "padding-right";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-top-style") + "!!" + "border-top-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-top-width") + "!!" + "border-top-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-top-color") + "!!" + "border-top-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-left-style") + "!!" + "border-left-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-left-width") + "!!" + "border-left-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-left-color") + "!!" + "border-left-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-bottom-style") + "!!" + "border-bottom-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-bottom-width") + "!!" + "border-bottom-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-bottom-color") + "!!" + "border-bottom-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-right-style") + "!!" + "border-right-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-right-width") + "!!" + "border-right-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-right-color") + "!!" + "border-right-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("position") + "!!" + "position";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("top") + "!!" + "top";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("left") + "!!" + "left";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("bottom") + "!!" + "bottom";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("right") + "!!" + "right";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("width") + "!!" + "width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("height") + "!!" + "height";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("min-width") + "!!" + "min-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("max-width") + "!!" + "max-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("min-height") + "!!" + "min-height";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("max-height") + "!!" + "max-height";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("visibility") + "!!" + "visibility";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("float") + "!!" + "float";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("clear") + "!!" + "clear";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("overflow") + "!!" + "overflow";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("display") + "!!" + "display";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("whitespace") + "!!" + "whitespace";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("list-style-type") + "!!" + "list-style-type";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("list-style-position") + "!!" + "list-style-position";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("list-style-image") + "!!" + "list-style-image";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-spacing") + "!!" + "border-spacing";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("border-collapse") + "!!" + "border-collapse";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("table-layout") + "!!" + "table-layout";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("empty-cells") + "!!" + "empty-cells";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("caption-side") + "!!" + "caption-side";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("cursor") + "!!" + "cursor";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("outline-style") + "!!" + "outline-style";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("outline-width") + "!!" + "outline-width";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("outline-color") + "!!" + "outline-color";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("clip") + "!!" + "clip";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("page-break-before") + "!!" + "page-break-before";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("page-break-after") + "!!" + "page-break-after";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("page-break-inside") + "!!" + "page-break-inside";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("quotes") + "!!" + "quotes";
    ComputedStyle=ComputedStyle+"!@#"+CSSDec.getPropertyValue("content") + "!!" + "content";

    LastClickedElementStyle=ComputedStyle;

    }

    function GetElementHTML(element) {
    LastClickedElementHTML=element.outerHTML;
    }

    // -->

    </script>

    Posted: 3 years #
  2. If the file name ends with xhtml can you change it to html and see what happens?

    thanks
    Sara

    Posted: 3 years #

RSS feed for this topic

Reply

You must log in to post.

0.065 - 9 queries