Help required in changing the contents of a string

hi guys
I'm reading in a series of xml files which contain a passage
of text like that below
Here is an example:
Since iritis is associated with HLA B27, it may obviously
occur in any of the <GLOSS
ID="seronegative">seronegative</GLOSS><SMALLIMAGE
width="348" height="254">charcothip.jpg</SMALLIMAGE>
I am displaying this text in a html textfield. However for it
to display properly, I need to replace the <SMALLIMAGE> tag
with
<IMG SRC="charcothip.jpg"/> etc
I can do a replace on <SMALLIMAGE and turn it to <IMG ,
however how do i add the SRC="charcothip.jpg"> ?
can anybody provide me with some suggestions for how to do
this?
Any ideas and suggestions would really be appreciated
Thanks

If you can replace <SMALLIMAGE with <IMG then I am not
sure why you couldn't include the SRC="charcothip.jpg" with the
<IMG portion?
How are you replacing it currently? Could you store the
replacement string in a variable and use it instead.
var replacementString:String = "<IMG
SRC=\"charcothip.jpg\"";
Then you could do something like this (assume the myStr holds
the XML String):
var myArr:Array = new Array();
myArr = myStr.split("<SMALLIMAGE");
myStr = myArr.join(replacementString);
Obviously, this will only work if you are replacing all of
the <SMALLIMAGE pieces with the same image. If not then you
could use the following:
var searchFor:String = "<SMALLIMAGE";
var newString:String = myStr.substring(0,
myStr.indexOf(searchFor));
newString += replacementString;
newString +=
myStr.substr(myStr.indexOf(searchFor)+searchFor.length);
You can keep the width and height attributes since Flash will
recognize those when rendering the HTML.
Tim

Similar Messages

  • Help required in changing the default page during server startup

    I am using JSF 1.1 and BEA Workshop Studio 3.3 on WebLogic 9.2. When ever I start or restart my server, by default the application opens up in Internet Explorer with url http://localhost:7001/. I appreciate if someone can let me know if it is possible to change the url to open up my home page.
    To be precise I would like to open http://localhost:7001/pages/home.jsf instead of http://localhost:7001/ when the server starts or restarts. Any help is highly appreciated.
    Thanks.
    ~SirG

    Set the context root to "/" in application server's configuration and define a welcome-file in webapplication's web.xml.

  • How do I change the contents of a string when I click on an image?

    I have hundreds of images that need to play a unique sound when clicked.  In order to simplify the building of this flash file I need to streamline it in a way that will allow me to change only one word.  Below is some example code.  I think the reason it doesnt work is that I am declaring "word" twice...any suggestions anybody?  Thanks in advance...
    import flash.events.MouseEvent;
    stop()
    var word:String = "family"
    trace (word + "_nv")
    this[word+ "_nv"].addEventListener(MouseEvent.CLICK, playaudio);
    this[word+"_nv"].buttonMode = true;
    var word:String = "grandchildren"
    trace (word + "_nv")
    this[word+ "_nv"].addEventListener(MouseEvent.CLICK, playaudio);
    this[word+ "_nv"].buttonMode = true;
    function playaudio (event:MouseEvent):void{
    this[word+"_nv"].play()

    I don't see where what you show is streamlining anything.  It would save code to just use the strings instead of assigning the string to variables and using the variables.  In any case. yes, you do not want to declare the same variable twice (use "var" only once).  And your playaudio function will only work with whatever the last value of "word" that you assign.
    To streamline the code you could name each mc using a numeric increment (mc_1, mc_2, mc_3, etc), and then assign your listener in just a few lines using a loop.  In the play audio function you could use the instance name of the event.currentTarget...
    this[event.currentTarget.name].play();
    or even
    MovieClip(event.currentTarget).play();

  • How to change the content of GTC (terms and conditions) for Partner

    Hi all,
         We are using R/3 version of ISA B2B site. while creating order thru Shopping Basket we have requirement that We need to provide GTC (General Terms and Condions) for the Partner (View GTC link ).  Right now some default text is displayed in that window (text text text ext text text text text text like that). we need to change this.
    where i can change this text and enter our own terms and conditions.
    Please help me to resolve this,
    thanks in advance
    siva kumar

    Hi Siva,
    the GTC is shown in the JSP b2c/order/terms_and_conditions.jsp. If you have a look at the file, you will find the following code:
    <isa:translate key="b2c.order.termsAndConds.txt.dmy"/>
    The translate tag will render the language dependant text for the resource key "b2c.order.termsAndConds.txt.dmy". To change the content that is shown you can change the resource text or create your own resource key in the corresponding resource file. The resource files are located in the src-folder of the web application DC.
    Best Regards,
    Peter Kraus
    SAP Web Channel Consultant
    http://www.leonardo-it.com

  • Dynamically change the contents of one combo box based on the other

    Hi Forum,
    I have a question which might have a possibly simple answer. Well anyway help me out since i could not find the simple answer.
    I am building an application using Swing and binding with BC4J using JClient. My GUI has combo boxes, grids, editboxes. My requirement is that i should be able to dynamically change the contents of one combo box based on the selected item in trhe previous combo box. For example, when i choose a country in the "country combo box", the "states combo box" should show the list of the states of the selected country.
    Now how do i do this using binding. If not, how do i write custom querirs in BC4J layer and return a resultset to the remote application so theat i can populate the dependent combo boxes.
    I will appreciate if anyone can help me out in this regard.
    Thank You
    Sumit

    there could be quite a few number of ways of solving this problem.
    One way is through event handlers.
    taking your example as a model when user selects a country you could fire an action with a flag set to ture. A method will return the states from the DB or your temporary files or what ever and then the true flag will be used in the states combo box rendering.
    other way: javascript
    this might be a bit clumsy as you will need the states information in a property file and you can get the info as the user selects a country.
    regards,
    raj

  • Firefox crashes whenever i want to install any addon or download any file. Some times i am receiving error while downloading any file like "could not be saved, because you cannot change the contents of that folder"

    I am the user of latest firefox 3.6.6 browser. I am getting problems of frequent crashes whenever i tries to install any addon. The crashes also occures whenever i want to download any file.
    I am also receiving errors while downloading any file like:
    "C:\Users\****\AppData\Local\Temp\******.001.part could not be saved, because you cannot change the contents of that folder.
    Change the folder properties and try again, or try saving in a different location. I already changed it many many times but still the same problem."
    Adobe flash palyer is also giving problems of not responding. I am using updated version of it already. Java is also updated.
    I already uninstalled firefox compeletly and re installed it many many times but still the same problem. I also scanned my computer with avira and malware bytes' Anti malware and got no dection. Please ractify this problem ASAP lest my profession will suffer.
    == Crash ID(s) ==
    b7f518f2-8d86-41ca-8bab-aee632100709; 1d790e10-d8eb-4904-98c9-94bc62100708; f042d319-b9f8-42ed-a8cb-57c7d2100708

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • When firefox trys to auto update, or I manually download the new version, or some but not all downloads off of the web, I get this error message. C:\Users\John\AppData\Local\Temp could not be saved, because you cannot change the contents of that folder.

    First off, when firefox trys to auto update, it fails. It tells me to try and download the new version from mozilla's site. When I try to download the new version I get this: (C:\Users\John\AppData\Local\Temp could not be saved, because you cannot change the contents of that folder.)
    This is the same message I have been getting when I try to download other things off the net. (When I use other browsers to download I dont have this problem)

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • Changing the Content of a Document at creation time using Java

    Hi,
    I made a ClassObject 'Division' that is a subclass of the
    oracle.ifs.beans.Document,
    and I want to change the content of a Division instance while it
    is being created because I can't change the editor (Epic) that
    creates this object.
    (and it has to be at creation time!)
    To do this, I made a server-side class S_Division that
    implements the extendedPreUpdate method.
    I was able to get the content of the object when that method was
    called for the 4th time
    and that way I could change some attributes of that object that
    depend on that content.
    My problem is that I need to change the origal content into
    something else using that extendedPreUpdate method
    and I don't know how.
    The bean-side Document class has an easy method setContent
    (DocumentDefinition) for changing the content of its instances,
    but the server-side S_Document doesn't!
    So how can I do that using the server-side classes?
    Maybe using the update(OperationState,
    S_LibraryObjectDefinition) method?
    Can someone give me some help or an example that shows me the
    way?
    Thanx,
    Gerd Vanhoof

    Hi,
    I made a ClassObject 'Division' that is a subclass of the
    oracle.ifs.beans.Document,
    and I want to change the content of a Division instance while it
    is being created because I can't change the editor (Epic) that
    creates this object.
    (and it has to be at creation time!)
    To do this, I made a server-side class S_Division that
    implements the extendedPreUpdate method.
    I was able to get the content of the object when that method was
    called for the 4th time
    and that way I could change some attributes of that object that
    depend on that content.
    My problem is that I need to change the origal content into
    something else using that extendedPreUpdate method
    and I don't know how.
    The bean-side Document class has an easy method setContent
    (DocumentDefinition) for changing the content of its instances,
    but the server-side S_Document doesn't!
    So how can I do that using the server-side classes?
    Maybe using the update(OperationState,
    S_LibraryObjectDefinition) method?
    Can someone give me some help or an example that shows me the
    way?
    Thanx,
    Gerd Vanhoof

  • Changing the Site URL of a Sharepoint site changes the content type order

    Description
    Changing the Site URL of a Sharepoint site changes the content type order of all lists that
    * contain folder content types
    * and have a custom content type order
    * where a folder content type is the first content type in order.
    Reproducible behaviour
    1. Create a Team Site in Sharepoint
    2. Create a Task List "Test" on the Team Site
    3. Go to List Settings
    4. The Content Type order is by default
        a. Task
        b. Summary Task
    5. Change the Content Type Order to
        a. Summary Task
        b. Task
    6. Go To Site Settings "Title, description and icon"
    7. Change the Site Url
    8. Go To List "Test" List Settings
    9. The Content Type order now is
        a. Task
        b. Summary Task
    10. Select "Change New button order and default content type"
    11. Here, the Content Type order still is
        a. Summary Task
        b. Task
    Is this a bug? Has anyone noticed this behaviour before?
    Kind Regards,
    Joachim

    Hi Joachim,
    You are not missing something or doing something wrong. i Hope :). This behavior is reproductible.
    The granularity of change is better by Powershell. But by the interface is most user-friendly.
    Maybe that's the reason of this behavior.
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • CATS - It is possible to change the content of the Rejection e-mail?

    Hi all,
    we are in ECC 6.0 and have implemented CATS.
    Do you know if it is possible (and how!) to change the content of the e-mail that is sent to the employee in case of CATS rejection?
    Thanks and regards,
    Cristiana

    Hello, nice idea!
    I did figure out that the program use text elements, however, one is not allowed to change them. I then raised an OSS note and SAP raplied that I couldn't change the text elements - I really don't like the email that is sent from CATS rejection!
    I really ike the sound of your idea. I am not familiar with translations though. Would you be able to detail it a bit more about how to translate a text element?
    When I get to the text element screen, if i follow menu path Goto > Translation, a screen pops up asking me to chose a Target Language. What should I do then? Select the target language to EN (the original language is EN) ? And then, how do I make sure that the program uses the translated text?
    Thanks a lot for your help!
    Cheers,
    Cristiana

  • How to change the content in request at approval stage

    Dear experts,
    We have a requirement like following:
    Frist, User submits a new account request, the field "Position" is set to cerntain value, eg. sales support
    Then, Manager should have the capbility to change the content in field "Position", such as changeing sales support to sales manager, when he approves the request.
    However, it seems that only very few fields can be changed after request submition.
    How could we configure AC to let the managers can change the content in request at approval stage?
    Thanks a lot!

    Tang,
    In the stage for the Manager set the "Change Request" to 'Yes'.  This will open up a few fields for you, including user group, role validity dates, etc.  I do not believe this will open up position though.

  • WM-RF: Changing the content of an error message

    Hi,
    may be someone could help me...
    when a user is in a queue, but there are no further TOs in this queue, a message / error is shown:
    "The system could not find transfer order for execution".
    Is it possible to change the content of this message unproblematicly? Where can I change it? Screen-Management??
    Thank you!
    Best regards

    I didnt find the right message number by clicking on it. but i found the error message in se91....
    too easy
    thx a lot...

  • Change the contents of file.

    I have a table with fields BLOB and CLOB.
    Store Word files in a BLOB field, my question is:
    I change the contents of a Word file stored in a BLOB field using DBMS_LOB.CONVERTTOBLOB?
    OR
    .-CONVERT THE CONTENT OF BLOB FIELD TO A KIND OF VARIABLE CLOB
    2.-CLOB to convert BLOB
    3.-load the cam, po BLOB file with the UTL_FILE.
    I am l, or correct?
    I work with Ortacle Database XE y Apex 3.0.1
    Roberto.
    Message was edited by:
    user584812

    Please help.
    It is getting worse
    Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
    Please help.

  • Bad XML from external web service and would like to change the content

    I am getting a bad XML(not valid) from external web service and I would like to change the content of the body in OSB proxy service to make it valid.
    For example
    <g:Information xsi:schemaLocation="http:// bad schema" xmlns:g="http://abc.com/t.xsd">
    <test>Test Data</test>
    </g:Information>
    should become
    <g:Information xmlns:g="http://abc.com/t.xsd">
    <test>Test Data</test>
    </g:Information>
    Do you how can I do this?

    I don't think it would be the best solution but you may try -
    1. Conver the incoming XML to string using fn-bea:serialize() function
    2. Replace the not-required content with a blank
    3. Covert the string back to XML using fn-bea:inlinedXML
    If you find any other solution, please let us know.
    Regards,
    Anuj

  • I have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code?

    i have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code? thank you!

    i inherited the website. It’s for a non-profit and is not very
    sophisticated, and neither am I in webdesign. It currently has multiple
    pages that are identical except for that body section, so whenever i change
    the navigation (in the sidebar) I have to update every html page.  I want
    to have one basic page, and just call in the different body content based
    on the link the user selects from the nav bar. How can i do that using a
    script? i am using Dreamweaver.
    ~ in love and light ~
    Jeannie
    On Sat, Feb 7, 2015 at 4:07 AM, Ben Pleysier <[email protected]>

Maybe you are looking for

  • How to get sum of quantity column in table control

    Hi, expert , Someone can guide me how to get som of qty column in table control ? I created a screen with a table control  and has a  qty quantity field . I want to show total of qty  in a  field . my code like this ... PROCESS AFTER INPUT.   LOOP AT

  • Time Machine is stuck on "Preparing Backup"

    My Backups have not worked for about a month.....and have been in a perpetual "preparing" state. I have Imac with OS version is 10.7.5, Build is 11G63 Have got this from console logs if it help shine any light on the nature of my issues, and how to f

  • Download usage is going up very fast, even when no...

    My son has BT Infinity and has tried to find out why the downloading keeps going up  - upto 1 GB a day, even when he is not using the internet, and when they do its only things like facebook. He doesn't stream movies or anything like that. He went to

  • Upgrade from BO XI R2 to BO XI 3.0

    We have a BOE system with BO XI R2 (SP4) on Unix. We are planning to upgrade to BO XI 3.0 Can someone suggest the process to upgrade? Also we have some Desk-I reports developed on BO XI R2, we need to upgarde these reports as well to BO XI 3.0. Thank

  • BPEL JMS Adapter - SonicMQ

    Does anyone have any up-to-date examples on creating a PartnerLink that is a JMS adapter to an SonicMQ queue? I have BPEL running as a component of OAS, and when I try to add a resource adapter for the SonicMQ domain, the OC4J_BPEL server errors tryi