Spliting up stacked text with JavaScript

I am trying to get any stacked text in my illustrator file that is a single frames  such as with carriage returns such as:
1
2
3
4
5
to be individual text frames.
Is there a split command I can use?
Can anybody point me in the right direction?
Im thinking it would start by finding all the textframes that have carriage returns
is the carriage return identified as "\n"
Any help would be appreciated,
Duane

I got this awesome code from John Wundes. It would crash illustrator if you had more than one textframe selected. With my modifications it still will not do more than one textFrame with carriage returns.
It runs through the first time looking for textFrames with carriage returns  in my file and when it finds one it goes into the if statement(which is all of John Wundes code.)
But when it finishes with the first textFrame with carriage returns it keeps the first line of text selected and quits when moving on to the second textFrame with carriage returns. Does anyone know why it quits
//Divide TextFrame v.2.1 -- CS,CS2,CS3,CS4,CS5
//>=--------------------------------------
// Divides a multiline text field into separate textFrame objects.
// Basically, each line in the selected text object
// becomes it's own textFrame. Vertical Spacing of each new line is based on leading.
// This is the opposite of my "Join TextFrames" scripts which
// takes multiple lines and stitchs them back together into the same object.
// New in 2.1 now right and center justification is kept.
//>=--------------------------------------
// JS code (c) copyright: John Wundes ( [email protected] ) www.wundes.com
//copyright full text here:  http://www.wundes.com/js4ai/copyright.txt
    added code part 1 Start
var doc = app.activeDocument.activeLayer;
var myTextFrames = doc.textFrames;
for (i = 0; i < myTextFrames.length; i++) {
                                                                                              alert("starting textFrmes length" + "the amout text frames = " + i);
  myContent  = myTextFrames[i].contents.toString();
  if (myContent.indexOf("\r") !== -1) {
                                                                                             alert("starting selected text with carriage returns");       
      myTextFrames[i].selected = true;
    added code part 1 End
var item =  activeDocument.selection[0];
var selWidth = item.width;
if(item.contents.indexOf("\n") != -1){
    //alert("This IS already a single line object!");
}else{
    //get object position
    //getObject justification
    var justification = item.story.textRange.justification;
    //make array
    var lineArr = fieldToArray(item);
    //alert(lineArr);
    tfTop = activeDocument.selection[0].top;
    tfLeft = activeDocument.selection[0].left;
    activeDocument.selection[0].contents = lineArr[0];
    //for each array item, create a new text line
    var tr = activeDocument.selection[0].story.textRange;
    var vSpacing = tr.leading;
    for(j=1 ; j<lineArr.length ; j++){
        bob = activeDocument.selection[0].duplicate(activeDocument, ElementPlacement.PLACEATBEGINNING);
        bob.contents = lineArr[j];
        bob.top = tfTop - (vSpacing*j);
        if(justification == Justification.CENTER)
             bob.left = (tfLeft + (selWidth/2)) - (bob.width/2);   
    else
            if(justification == Justification.RIGHT)
            bob.left = (tfLeft + selWidth) - bob.width;   
    else
           bob.left = tfLeft;
        bob.selected = false;       
    added code part 2 Start
else {
  //alert("The contents of frame "+ i + " is = "+ myContent); 
    added code part 2 End
function fieldToArray(myField) {
    if (myField.typename == "TextFrame") {
        retChars = new Array("\x03","\f","\r","\n");
        var ct = 0;
        var tmpTxt = myField.contents.toString();
        for (all in retChars )
        tmpArr = tmpTxt.split(retChars[all]);
        ct+= tmpArr.length;
        //--and just for kicks...
        ct+=1;
        //alert(ct);
        while (ct>0) {
            //throw something lucicrious as a content divider...
            tmpTxt = tmpTxt.replace(/[\x03]|[\f]|[\r\n]|[\r]|[\n]/,"_:X:_");
            ct--;
        return tmpTxt.split("_:X:_");

Similar Messages

  • Captivate 8 - submit buttons/images no longer showing on devices after adding text with javascript

    I'm working on a Captivate 8 project to publish to devices through PhoneGap. This is working successfully on iPhone and Android so far. I have modified the quiz so I have 2 types of quizzes with 3 levels each without the final score showing at the end (they have to get the answer correct to move on to the next question).  The submit buttons and image I added to each slide has been working perfectly until I added a text caption with a variable to show "Q X of 6" for each question, with X being a variable that increments by 1 for each slide and then I have another script at the end of each level to reset the variable back to 0.  This is working, however the submit button/success message and image on each slide is now not showing.  The submit button appears to still be on the screen as I can click in the same area where the it should be and it works but appears to be faded completely out, and the success message now shows so lightly I can hardly see it. My image does not show at all now.  I've checked the timeline and they are all set the same, to appear for the rest of the slide.  Any ideas?

    actually I think it might be an issue related to upgrading my Mac from Mavericks to Yosemite as the app was working perfectly before. I stripped all the javascript off and repackaged and it's having the same issue so I don't think it's the javascript. I'm going to keep looking into this.

  • Number of lines in a Field of type Text with Javascript

    Hi,
    I have a form where I need to dynamically retrieve the number of lines in a Field of type Text.
    When I use getField(), I'm returned an object of type Field. I can see such properties as rect, but nothing concerning the number of lines of text in the field.
    Any idea (other than getting the Field height and dividing that by the height of a line) ?
    Regards,
    Karl.

    Hi,
    You can use below function to calculate the no of lines in the Text field dynamically.
    import mx.controls.textClasses.TextRange;
        import flash.text.TextField;
        private function calculateNoOfLines():int
          var tr2:TextRange = new TextRange(_text, true, 0,_text.text.length-1);
          tr2.text = _text.text;
          _text.invalidateSize();
          _text.invalidateDisplayList();
          _text.invalidateProperties();
          var contentTextField:TextField = _text.mx_internal::getTextField();                           
                  var nLines:int = contentTextField.numLines;
                  var lineMetrics:TextLineMetrics = _text.getLineMetrics(0);
                  // This is to calculate the total text height
                  var _textHeight:Number = lineMetrics.height * nLines;
         return nLines;    
    Call the above function in the KeyUp event of the Text field.
    Here in the above field _text is the Text field.
    <mx:Text id="_text" />
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Change Tooltip with Javascript

    i want to change the tooltip-text with javascript.
    is there a way to do that?
    i have a lot of checkboxes and want to change the caption AND tooltip with javascript from an array. it works fine with the caption-text
    thanks
    herbert

    Hi,
    Try this.
    this.assist.toolTip.value = "Hi from Avoka";
    Regards
    Philip

  • How to make separate/individual text frame from one parent frame in indesign with javascript

    Hi all,
    Please suugest - how to make separate/individual text frame from one parent frame in indesign with javascript.
    Thanks
    Rohit

    @Larry – ah, your interpretation could be the right one…
    May I rephrase the question:
    "How to split threaded text frames to single ones?"
    "SplitStory.jsx" or "BreakFrame.jsx" under Scripts/Samples indeed could be the answer.
    From the comments in the code of "BreakFrame.jsx":
    //Removes the selected text frame (or text frames) from the
    //story containing the text frame and removes the text contained
    //by the text frame from the story.
    //If you want to split *all* of the text fames in the story, use the
    //SplitStory.jsx script.
    Uwe

  • Alert "Stack Overflow with Line at 2" if i calculate Total at onchange.

    Hi Friend,
    i am using java Script to Multiply Two Column and Total Come In to P1_total Item On onchange Action.
    Now Problem is when i enter Rate Value Into :p1_rate and Qty Into :p1_qty Item and press TAB when My Cursor is in P1_qty Item then value is change Into P1_total Item But Display a alert with Massage
    "Stack Overflow with Line at 2"
    My java Script is
    <script type="text/javascript">
            function getVal(pNd){
              return ($v(pNd)!= "")?parseFloat($v(pNd)):0;
              function taxamt(){
             $s('P1_TOTAL',getVal('P1_RATE')*getVal('P1_QTY'));
    </script>
    onchange apply in P1_QTY
    onchange="javascript:taxamt()"style="width:220px;"How to resolve it.
    Thanks

    HI Friends,
    i have resolve it.
    Actuuly i have Pass
    onchange="javascript:taxamt()"style="width:220px;"
    on both item 'P1_QTY' ,'P1_TOTAL'
    it should be pass only in ' P1_QTY'  item.Thanks
    Edited by: Vedant on Aug 15, 2011 11:38 PM

  • Creating a donught shaped pie chart with javascript elements

    Good morning chaps,
    We recently built our new company website which we're happy enough with. However one element we tried to capture was an interactive donught shaped pie chart, using javascript to click on each seperate section.
    The end result can be viewed at;
    http://insight247.co.uk/index.php?page=aboutus
    You'll notice imemdiately that the part that's a little off is the text which sits in each section. IS there an easier way to combine the graphic, text and javascript to achieve the effect we're looking for?
    Many thanks to all responses.

    Stephen,
    There are a few strange parts: the irregular text, the irregular shapes of the underlying ring parts (which do not have consistent widths at the gaps), and the outer glow (or whatever) which correponds to a full ring on the inside but partially to separate objects on the outside.
    IS there an easier way
    Maybe not easier, but more accurate; the specific appearance is somewhat demanding.
    To get the right shape of both ring parts and letters and different choices concerning the outer glow, you may (Smart Guides are your friends):
    1) Create a fill/nostroke rectangle with the same height as the ring parts and an arbitrary length, then Object>Transform>Move a copy by the length, then Ctrl/Cmd+D to repeat 4 times;
    2) Select all six rectangles and in the Brushes palette flyout tick New Brush, select Art Brush with default settings;
    3) Create a 1pt stroke/nofill circle corresponding to the middle of the ring parts where the text bits are supposed to be, apply the Art brush to it, Object>Expand Appearance, and move the circle to the top in the Layers palette, above the Group;
    4) Direct Select each of the 6 ring parts and apply the desired colour (you may rotate later, see below);
    5) Select the stroked circle and with the Scissors Tool click where the ring parts meet (Smart Guides say intersect except at the sides where they say anchor) so you have 6 circle parts to match the ring parts, then select the 4 circle parts that are not at top and bottom and Object>Path>Add Anchor Points so you have a centre point for each of them (you had one already at top and bottom);
    6) Select one of the circle parts and with the Path Type Tool click on the centre point, then type the text bit and in the Character palette adjust the Baseline Shift once and for all (you may need to tick Show Options in the flyout);
    7) Repeat 6) for the other circle parts (except the Baseline Shift);
    8) Select the ring parts group and Effect>Stylize>Outer Glow, adjust the colour (black) and settings to make it look as desired;
    9) With the Direct Selection Tool click where two ring parts meet (avoid the Path Type) to select an end segment and Ctrl/Cmd+C+F+X+F to create a straight stroke/nofill path at the very top of the stacking order, then change the Stroke Weight to the desired width of the gap between ring parts and change the Colour to white;
    10) Repeat 9) on the opposite side of the circle, select both 9) and 10) and rotate copies twice by 60 degrees, group all;
    11) Rotate everything by 30 degrees to amtch the angles of the image.
    Now you have the final appearance with white gaps. If you want to have gaps in the same colour as the background, you may:
    12) Select everything and in the Appearance palette flyout tick Make Opacity Mask, with Clip unticked and Invert Mask ticked.
    If you want to hide the outer glow at the gaps at the outside (as in the image) or at the inside or both, you may extend the lines in 9) and 10) at either or both ends.

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Printing different URL with javascript

    I am trying to print a URL using javascript but i do not want to print the current page. I have searched google, this forum and a javascript book and can not seem to figure it out. To exlplain in it generic terms i want to be on one page and tell it to print another. Reason being, I am looking at an overview page and want to print a report made in Oracle reports, (Yes I could load the report and print it but i want to print multiple reports from one button)(The reports do work and are valid) Here is a rundown of what I am doing.
    From a button i am calling a 'url' with the following code:
    javascript:V_PRINT('P50_CUSTOMER_ID','P50_YEAR');
    And then in the html header i have the code: (printing same page twice, just an example)
    <script language="JavaScript" type="text/javascript">
    function V_PRINT (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url1;
    var url2;
    url1 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url2 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url1 = print();
    url2 = print();
    </script>
    This code just prints the current page. I know I am calling print incorrectly and thats where i need the help. Of course I might just be approaching it all wrong. Either way I hope someone with javascript knowledge can help.
    Thanks

    Hello,
    To print a page it has to be open in the browser since all it does it call the browsers print dialog.
    Here is one solution http://www.irt.org/script/508.htm and you can also try a iframe instead of a regular frame.
    If it's crossdomain request like your example here that might cause problems as well. There might be additional problems.
    Carl

  • XML IDOC post to R/3 Via WAS - want to see error content with JavaScript

    Hi,
    I am posting XML IDOCs to our R/3 system via a webpage that I have built with JavaScript.  I am posting to the WAS, which is configured to read the XML IDOC with SAP's standard class handler CL_HTTP_IDOC_XML_REQUEST.  We are on basis 620 support pack SAPKB62041.
    In my webpage, I have the JavaScript code set to read the status and statusText so I can see the response from WAS when I post my XML IDOC.  However, I am getting back very generic information when I encounter a 409 error.  THe statusText is always "input_not_found".  So I debugged the class handler code and found that SAP is returning back the more descriptive error info in HTML format.
    I ran a packet sniffer to see what WAS returns and the info looks like this:
    <html><head><title>IDoc-XML-inbound not ok</title><h1>IDoc-XML-inbound not ok</h1></head><body>
    E:Table Lookup Error:300 Cannot map value for field MESCOD in table ZFI_IF_IDOCORG using values
    SNDSAD = |TE|  and RCVLAD = |GL|  and MESTYP = |ACC_DOCUMENT|</body></html>
    I want to know how I can get my webpage to read this HTML info and store that into an alert so I can read this text that I'm returning back to the HTTP post.
    This is how my script looks.  I'm using IE6.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>Test XML</title>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function XMLHTTPButton_onclick(DataToSend) {
         var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
         xmlhttp.Open("POST","http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN",false);
         xmlhttp.setRequestHeader("Content-Type", "text/xml");
         xmlhttp.send(DataToSend);
            alert(xmlhttp.Status);
            alert(xmlhttp.statusText);
         alert(xmlhttp.responseXML.xml);
    //-->
    </SCRIPT>
    </head>
    <body>
    <BR>
    This page posts to
    <BR>
    http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN
    <FORM name=xmlform method=post >
    <P><TEXTAREA style="WIDTH: 623px; HEIGHT: 369px" name=xmlData rows=23 cols=77>
    </TEXTAREA>
    <P>
    <INPUT type="button" value="Submit XMLHTTP" id=XMLHTTPButton name=XMLHTTPButton
    LANGUAGE=javascript onclick="return XMLHTTPButton_onclick(document.xmlform.xmlData.value)">
    </form>
    Previously with this class handler, SAP returned the detailed info back to the "alert(xmlhttp.statusText)" and I had no problem seeing the return info.  But now they have decided to format it in HTML and I don't know how to view this text since it has no ID on it to pull this into an alert box.
    If anyone has any ideas, please let me know.
    Thanks,
    Andrea

    Ok!
    I have solve the problem. So, I was trying to connect via SSO within an user that was not registered in R/3 and I forgot it.
    Sorry for the inconvenience.

  • Is there a good way to replace the "view cart" text with another text?

    I have this big issue i'm still stuck with, i hope someone can help me.
    I need to change the text "view cart" in the cart-summary module. I have learned that i can do this with javascript: http://forums.adobe.com/message/4409239#4409239
    But there are problems:
    When i use this javascript:
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script>
    $(function () {
      $(".cartSummaryLink").text("Afrekenen");
    $(function () {
      $(".cartLink").text("Winkelwagen is geleegd");
    </script>
    The "view cart" is replaced with "afrekenen".
    BUT:
    When i add another product in the large product layout the text "view cart" is back...
    When i delete a product in the cart  the "view cart" text is also back
    When i refres the page the "view cart" text is replaced again with "afrekenen"
    So i thought, to use some javascript to refresh the page when a product is added:
    <script type="text/javascript">
    function AddProductExtras(){
    document.location.reload(true);
    </script>
    This works but you can see that the text changes from "afrekenen" to "view cart" and back to "afrekenen" Also the page is rebuild again which is not a very good solution.  So here are my questions:
    Is there a better work around?
    If not, is there a way that when a product is deleted in the cart the page can also be refreshed?
    Thanks,
    Frank

    Hello Mario,
    Here's my site where i'm working on:
    http://grootaartseuronics.businesscatalyst.com/index.html
    The cartsummary module is located at the right sitebar.
    The code is:
    <div id="plh_winkelwagen">
    <div class="cart-summary">{module_shoppingcartsummary,vertical,}</div>
    </div>
    The CSS is:
    #plh_winkelwagen {
    float: right;
    width: 160px;
    height: 100px;
    margin: 20px;
    background-color: #FFC;
    background-image:url(../Images/Winkelmandje_nieuw_25.png);
    -webkit-border-radius: 15px; /* Safari */
    -webkit-border-radius: 15px; /* Safari */
    -moz-border-radius: 15px; /* Firefox */
    -moz-border-radius: 15px; /* Firefox */
    border-radius: 15px; /* CSS */
    border-radius: 15px; /* CSS3 */
    .shop-main .cart-summary {
    float: right;
    width: 40%;
    So with your solution I should remove the background plh_winkelwagen en create or put it in the a.cartsummarylink? Or should i keep the plh-winkelwagen and just add your solution. I can create a png the same size as the: winkelmandje_nieuw_25.png with the "afrekenen" text in it?
    Thanks,
    Frank

  • Pages not loading completely with JavaScript enabled

    This just started in the last day or so. I have Safari extensions disabled.
    When I go to the ThinkProgress.org site/blog, I'm getting an incomplete page unless I disable JavaScript. With JavaScript, I'll get the first post on the blog, but nothing else. With JavaScript off I get the site looking pretty much normal.
    I get a similar problem if I go to Economist.com and click to read one of the stories. In that case, I get the story's headline, but it cuts off before the text of the article, right after a link to Tweet the story. Again, disabling JavaScript allows the page to load correctly.
    I suspect some third-party service is providing a script, which broke in the last day or so, but nobody's paying attention because of the Holidays.
    The problem doesn't appear to effect Chrome. Safari was upgraded to 5.0.3 in November, but this problem is more recent than that.
    Has anyone else seen this?

    Hi Jonathan,
    Go to the Economist.com site.
    From your Safari menu bar click Safari / Preferences then select the Advanced tab. Select the box next to: Show Develop menu in menu bar.
    Now click Develop / Disable Runaway JavaScript Timer.
    See if that makes a difference.
    Otherwise, check Safari / Preferences - Extensions or try disabling Safari plugins, Safari / Preferences - Security.
    And delete the cookies associated with those url's in Safari / Preferences - Security. Show Cookies
    Carolyn

  • Opening document in frame with javascript

    Hello.
    I've got problem with javascript on Safari 4 (both and on Win and on MacOS), while trying to open html document in frame.
    Reproducing the problem is quite difficult, so I'll begin with html source.
    I have one frame in index.html file:
    +<iframe id="topframe" name="topframe" scrolling="no" frameborder="0" width="980" height="580" src="form1.html";></iframe>+
    form1.html looks like this:
    +<input type="button" id="action" name="action" value="Make action" onclick = "document.getElementById('actionframe').src='dir/action.html';">+
    +<input type="button" id="sel" name="sell" value="..." onclick = "top.frames[['topframe']].location.replace('form2.html');">+
    action.html source is:
    +<script type="text/javascript">parent.document.getElementById('sel').click();</script>+
    So, when you open index.html, you see two buttons: first opens form2.html in the same frame, second opens dir/action.html in other frame. While dir/action.html just "clicks" the first button.
    Basically both buttons does the same.
    The problem is, that Safari fails to open form2.html with first button. Somehow Safari thinks that form2.html is in /dir/, like action.html is. So you get this error:
    *Not Found*
    *The requested URL /safari_test/dir/form2.html was not found on this server.*
    This example works on all major browsers, except Safari 4. Even on Safari 3 it works fine.
    I made an example, so you can test it here:
    http://82.135.245.49/safari_test/
    Message was edited by: Elvinas

    Have you tried putting the full URL instead of just form2.html?
    Second option is to move the file to that directory and change it for the other browsers.
    Third option is to stop using frames altogether, they are generally considered bad practice and can cause issues with browsers that aren't IE.

Maybe you are looking for

  • Edge Animate CC 2014.1 keeps crashing after 10 minutes of working

    Edge Animate CC 2014.1 keeps crashing after about 10 minutes of working. I have to be very careful when importing layers, or anything I do, pretty much. It's like walking on thin ice every time I work on it. I'm working on something with a deadline a

  • Problem in opening .ics and .vcs file types through servlet in IE browser.

    I'm having problem in downloading an .ics and .vcs file through servlet in I.E browser. It is happening fine in Mozilla firefox(they both are getting opened in OutLook), but in IE it says as undefined file type. I'm using Content Type as : 'text/Cale

  • Podcast Won't Play

    Just installed (and uninstalled and reinstalled) iTunes, 64 bit, Windows 8 in order to play a podcast. Clicked play and nothing happened.  Nada.  Zip.  Zero.  Seems like it won't even button won't even "click." No error message. What gives?

  • ORA-12560 while installing database 11g

    Hi, I tried to create a Oracle Database using Oracle installer. I got the error ORA-12560 This is part of the logfile: INFO: Configuration assistant "Oracle Net Configuration Assistant" succeeded INFO: Command = oracle.assistants.server.DbcaCfgPlugIn

  • PSE12 Problems

    Recently installed PSE12.  Have following problems already: 1.  PSE12  "Help" menu sent me to an Elements Organizer Online manual, but get message "Sorry, this page is unavailable." 2. Updates will not complete; get close to 100% then get error messa