Dynamic XML content displayed in HTML using url variable

Hi guys,
The following is code i am having issues with:
<script type="text/javascript">
<!--
var xml_connect_00 = "new Spry.Data.XMLDataSet(";
var xml_connect_01 = "assets/xml/toolkit.xml\",
\"toolkit/section/";
var xml_connect_02 =
"/product\",{sortOnLoad:\"product_name\",sortOrderOnLoad:\"ascending\"";
var xml_connect_03 = ")";
// Create variable to see if there is a ? in the url
var url_input = document.URL.indexOf('?');
// Create variable from ? in the url to the end of the string
var xml_category = document.URL.substring(url_input+1,
document.URL.length);
var dsSoftware =
document.write(xml_connect_00,xml_connect_01,xml_category,xml_connect_02,xml_connect_03);
--->
</script>
dsSoftware is my XML Data set connection string, and by using
document.write, the correct string i want is displayed (in my
html), but - as you can probably guess by now(!) - i want it to
display in the actual Javascript code so i can connect to the xml
file and display the contents depending on the url variable sent.
Is this possible, and if so, am i going about it the right
way? I am not the most proficient at JavaScript, so may have some
ugly code (and not even 100% that this can even be done)!!
Just to give you an outline as to why i am doing this - my
XML file has different categories within it for different products.
I send the category name via a url variable to another page
(containing the above code) that will display the appropriate
category information depending on what url variable is sent.
Cheers in advance for any help.

Me again!
Sorry to keep updating, but i have now surpassed my last
question and got the alert to work correctly. The question i have
now regards the following code:
<script type="text/javascript">
<!--
var params = Spry.Utils.getLocationParamsAsObject();
var dsSoftware = new
Spry.Data.XMLDataSet("assets/xml/toolkit.xml", "toolkit/section");
//If the URL parameter 'software' has a value, set the XPath
that includes a filter and then load the data.
if (params.software){
dsSoftware.setXPath("toolkit/section[name =
'"+params.software+"']/product");
dsSoftware.loadData();
//alert(params.software);
//-->
</script>
Everything seems to work without error, but i cannot load my
xml file. The problem, i think, is that my xml heirachy is as
follows:
"toolkit/section/section_name/product"
section_name is unique for each section, and that is what i
am trying to pass through the url variable, so i can display all
the products from that section.
Can anyone tell me what i am doing wrong?
Cheers in advance - again!!

Similar Messages

  • Print Specific Frames and Dynamic XML content

    Hello, I am trying to print specific frames of my Flash movie
    with the dynamic text loaded from an XML file. The code below only
    prints the current frame I am on and does not print the XML text.
    The dataOK that is commented out is a function I have before that
    loads the XML content. The XML content is loaded to dynamic text
    boxes. Any help on this would be greatly appreciated.

    I am still having difficulty loading the XML data and the
    frameNum parameter does not seem to work. Argghhhh....
    function printTut(myevent:MouseEvent):void{
    var myPrintJob:PrintJob = new PrintJob();
    var mySprite:Sprite = new Sprite();
    var printArea:Rectangle = null;
    var options:PrintJobOptions = null;
    var frameNum:int = 2;
    mySprite.addChild(stage);
    mySprite.rotation=90;
    mySprite.scaleY=.80;
    mySprite.scaleX=.80;
    myPrintJob.start();
    myPrintJob.addPage(mySprite,printArea,options,frameNum);
    myPrintJob.send();
    print_btn.addEventListener(MouseEvent.CLICK,printTut);

  • Using URL variable to set initialy selected ds row

    Hello everyone,
    Could anybody suggest a solution or point me to a working
    demo of a script that processes a URL variable and set the current
    row accordingly. I am trying to pass a @id of a particlar row in a
    URL variable to identify a particluar row, I want to be selected
    initially.
    Thanks,
    Nick

    Hy guys,
    Just figured it out myself. Here is the script:
    <script type="text/javascript">
    // define your datasource. I have called it dsGallery. This
    name is used later in the script a few times
    var dsGallery = new Spry.Data.XMLDataSet("gallery.xml",
    "/gallery/photos/photo");
    dsGallery.addObserver({ onPostLoad: function(ds, type) {
    var strReturn = "";
    var strHref = window.location.href;
    if ( strHref.indexOf("?") > -1 ){
    var strQueryString =
    strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length;
    iParam++ ){
    if (
    aQueryString[iParam].indexOf('id' + "=") > -1 ){
    var aParam = aQueryString[iParam].split("=");
    strReturn = aParam[1];
    // look if a row with a matching @id is present in the
    datasource
    var row = dsGallery.findRowsWithColumnValues({"@id":
    strReturn}, true);
    // If we have a matching row, make it the current row for the
    data set.
    if (row) dsGallery.setCurrentRow(row.ds_RowID);
    break;
    </script>
    Thanks to the folks whose scrips were really helfull in
    building this one.
    Nick

  • How to use url variables?

    for example: www.blah.com/blah.php?id=1
    in this case, the url variable passed is id with a default value 1.
    what I am trying to do is to make the webpage display different things depend on the id value.
    so, a basic syntax problem... is this the correct way to do this?
    <body>
         switch (id)
              case 1: echo("something");
              case 2: echo("something else");
    etc
    (or am I missing some dollar sign or something?)
    also, how do i declare a variable in the body?
    just...
    int someVar;
    like in java?  or?

    Just so you'll know, such questions are more suited for the AppDev forum -
    http://forums.adobe.com/community/dreamweaver/dreamweaver_development
    I'll answer here, but in the future, new threads should be begun over there.
    Assuming PHP, in the head of the page you would have -
    <?php
    $id = isset($_GET['id'])?$_GET['id']:FALSE; // This loads the variable $id with the value of the URL variable
    ?>
    Then you could have -
    <body>
    <?php
    switch ($id) {
              case '1':
                   echo("something");
                   break;
              case '2':
                   echo("something else");
                   break;
    ?>
    (I forget whether that value is passed as a string or a number, so you may have to adjust the case statements.)

  • How to display images by using URLs in Interactive Reporting

    Hello everybody,
    My client has the Hyperion System 9.3 suite.
    We have a report in Interactive Reporting showing product data.
    The source for the report is a relational database (SQL Server).
    The data is grouped by product.
    My client needs the product's picture (jpg) in the report.
    The problem is that product images are not available in the relational database but via URL like this:
    http://client_domanin//Hyperion/id_product.jpg
    (the name of the image equals the id of the product).
    I was thinking to solve this problem using Java Script.
    I don't know Java Script and don't know how to 'integrate' the JavaScript code with Interactive Reporting.
    How should the Java Script look like?
    Any help will be extremely appreciated.
    Thank you all!
    Daniela

    You might be able to do it if you are using the iHTML view of the Report not the Interactive Reporting Web Client (Plug-in)
    I do not have a 9.x server available to test this so it is guess on how i did it once in a Proof of Concept.
    In Results section Create a Computed Item that will be the HTML tag for the Graphic
    the syntax would look something like below
    '<IMG SRC = "http://client_domanin//Hyperion/" + id_product + ".jpg">'
    WHERE id_product is a column in your Data.
    Again this will not show a graphic when viewed with Interactive Reporting Web Client or Desktop Client.
    Good Luck, hope this is helpful
    Wayne

  • Fm or class existing for fetching xml contents from a file using abap ?

    Hi,
    I need to fetch an xml file in a string of type xstring. I am using class cl_gui_frontend_services=>gui_upload.
    This returns me content in table format, than i am planning to conver to xstring.
    Is there any better approach or any existing function module any one know of ?
    thanks
    Regards
    Pooja

    Hi Pooja,
    You can try out this program to read the XML file using abap.
    *& Report  ZXMLTOITAB                                                 *
    REPORT  ZXMLTOITAB                            .
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
    l_xml_table
                                                        size  =
    l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
    IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    Regards,
    Samson Rodrigues.

  • Menubar from dynamic xml not displaying

    I can't get a Menubar to display the submenu items. The list
    displays properly without any reference to the "menubar" class so I
    think I must have something off in the area. I have searched the
    examples, api, and forum but I haven't been able to find anything
    to help me fix it. I have worked on this for a couple of hours so I
    am turning to everyone for help. Here is my code.
    <div spry:region="dsSubCat dsRefine dsRefineValue"
    class="SpryHiddenRegion">
    <ul id="MenuBar1" class="MenuBarHorizontal">
    <li><a href="#" class="MenuBarItemSubmenu">Sub
    Category</a>
    <ul>
    <li spry:repeat="dsSubCat"><a href="#"
    onclick="loadSubCatData('{dsSubCat::Value}');">{dsSubCat::Title}</a> ({dsSubCat::NumberOf Products})</li>
    </ul>
    </li>
    <li spry:repeat="dsRefine"><a href="#"
    class="MenuBarItemSubmenu">{dsRefine::@name}</a>
    <ul>
    <li spry:repeat="dsRefineValue"><a href="#"
    onclick="loadRefineData('{dsRefineValue::Value}');">{dsRefineValue::Title}</a> ({dsRefine Value::NumberOfProducts})</li>
    </ul>
    </li>
    </ul>
    </div>
    <script type="text/javascript"><var MenuBar1 = new
    Spry.Widget.MenuBar("MenuBar1",
    {imgDown:"../../images/SpryMenuBarDownHover.gif"})</script>

    Hey N,
    When dynamically creating widgets with Spry data, the
    constructor script tag needs to be within the spry:region.
    This allows it to fire off after the markup has been
    generated.
    Let us know if this solves it.
    Don

  • Multiple XML transformed to one HTML

    Can any one please help and tell me how to transform many small xml's to one html using one style sheet. What I want to do is to transform many small xml's(summary.xml, detail.xml etc) into one HTML using one or many xsl.
    Thanks,
    Vijayan

    You can use the document() function in XSL.

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • Why does my Adobe Dynamic XML Form (*.pdf)  submit as data.xml

    Hi, I have created a form and saved it as Adobe Dynamic XML Form (*.pdf)  the form used to submit perfectly via email but today it keeps attaching  to the email as in a data.xml format.  What would cause this and how do I fix it.
    P.S. I am a novice with Livecycle

    Check the properties on your submit button.  That is where you define the submission format.

  • Defining a spry data set from a url variable

    I am developing a family web site that, among other things, uses a single 'recipe' page to display recipes from different xml files as called by a url variable (e.g. ?xmlFile="{url}"&recipeName="{name}") from a summary page.  I can get the recipe name to reproduce using a $_GET php function, but I cannot establish the data set that way.  How can I define the data set from the incoming URL variable?  The necessary files are:
    The starting point from which I send the selected URL variable (use the scampi recipe)  http://ebogott.com/recipeBox.php.
    The file that is generated is http://ebogott.com/recipe.php?XMLfile=GrilledScampiOnAngelHair.xml&recipeName=Grilled%20Sh rimp%20Scampi%20on%20Angel%20Hair%20Pasta
    This methodology will allow me a number of cascading selections.  I know this is not unique.  I just haven't figured it out.
    don Carlos de la Playa

    don Carlos,
    The following shows the strength of the Spry framework. All very easy and simple.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var dsRecipes = new Spry.Data.XMLDataSet("recipes/recipes.xml", "recipes/recipe");
    var dsIngredients = new Spry.Data.XMLDataSet("recipes/{dsRecipes::url}", "recipe/ingredients/ingredient");
    var dsProcess = new Spry.Data.XMLDataSet("recipes/poultrySoup.xml", "recipe/process/element");
    //-->
    </script>
    </head>
    <body>
    <div class="MasterDetail">
      <div spry:region="dsRecipes" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="dsRecipes" spry:setrow="dsRecipes" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{name}</div>
      </div>
      <div spry:detailregion="dsRecipes dsIngredients dsProcess" class="DetailContainer">
        <div class="DetailColumn">{@genre}</div>
        <div class="DetailColumn">{@serves}</div>
        <div class="DetailColumn">{@time}</div>
        <div spry:repeat="dsIngredients">
          <div class="DetailColumn">{dsIngredients::qty}</div>
          <div class="DetailColumn">{dsIngredients::measure}</div>
          <div class="DetailColumn">{dsIngredients::item}</div>
        </div>
        <div spry:repeat="dsProcess">
          <div class="DetailColumn">{dsProcess::element}</div>
        </div>
      </div>
      <br style="clear:both" />
    </div>
    </body>
    </html>
    You will have to give a bit of style to the detail region.
    I hope this helps.
    Ben

  • Passing multiple ID's in URL variable

    How can I show results from a mysql database from selected ID's using URL variables?
    Showing results from one ID works fine:
    mypage.php?id=1
    But,
    My table has 10 rows and I want to show 3 of those rows:
    mypage.php?id=1&id=3&id=4
    Thanks for a point in the right direction.

    Are any of you original participants in this thread still around? I'm a bit of a "Jack of all trades, master of none" and I'm having a hell of time. I'm pretty sure this post relates to what I'm trying to do, but I'm just starting in dynamic site building with PHP and I can't seem to translate this situation into my situation.
    What I'm trying to do is set up a series of menu items for categories of merchandise (rugs), with subcategories for size. I've succeeded in making links where the user can choose ALL sizes within a category and (separately) I've succeeded in making links where the user can choose a size within a specific category, but I'm not able to create links where the user can choose a specific size OR see all sizes out of a single menu.
    Here's what I've got:
    3 tables: products, categories & size
    The size table has 2 columns - sizeName, and SizeID - the sizeID column is an integer and it links to products table.
    The categories table also has 2 columns - categoryName and categoryID - the categoryID column is also an integer which links with the product table
    I also built a menu with categories, and each category has a drop down menu where the viewer can choose a size.
    Each size link has a parameter which includes the categoryID as well (in following example, all the sizes are within one category):
    small - products.php?categoryID=8&sizeID=1
    medium - products.php?categoryID=8&sizeID=2
    large - products.php?categoryID=8&sizeID=3
    On the receiving page (products.php) I created a recordset which looks like this (I'm looking at the recordset dialog box within Dreamweaver CS4):
    SELECT price, `description`, categoryID, largeImage, smallImage, sizeID
    FROM products
    WHERE categoryID = colname AND sizeID = varSize
    ORDER BY price ASC
    the variables look like this:
    Name: colname
    type: Integer
    default value: -1
    Runtime value: $_GET['categoryID'}
    Name: varSize
    Type: Integer
    Default value: 1
    Runtime value: $_GET['sizeID']
    (Dreamweaver created colname and I created varSize. I'm not really sure why the default values are as they are).
    This works, but it doesn't give the "all sizes" option. So I've tried applying what I saw in the thread, by creating this link instead:
    products.php?categoryID=8&sizeID=1&sizeID=2&sizeID=3
    In the recordset I created the new variables like this (all as integers with 1 as default value):
    varSmall = $_GET['sizeID_1']
    varMedium = $_GET['sizeID_2']
    varLarge = $_GET['sizeID_3']
    And I wrote this code:
    SELECT price, `description`, categoryID, largeImage, smallImage, sizeID
    FROM products
    WHERE categoryID = colname AND sizeID = varSize
    OR
    WHERE categoryID = colname AND sizeID = varSmall AND sizeID = varMedium AND sizeID = varLarge
    But within the recordset dialog box, I hit the test button and I got a message about a syntax error.
    Am I anywhere near the solution? Any help would be greatly appreciated.
    Thanks,
    Dave

  • URL variables in WAD

    Hi Experts
    I'm using a query with variables and in my WAD report I let the user change the variables and then by using URL variables I re-call my template with the changed variables value. The issue is that, by working like that whenever the user change a variable, I re-call the template with it's original settings and I loose all drilldowns that the user already done in the report.
    Is there any way to transfer the current drilldowns in the URL?
    Or is there any other way to change variables and affect the report without re-calling the template through URL?
    Is there anything new in BI7 for that matter?
    Thanks
    Shlomi

    Hi Arun
    Sorry for the multiple postings.
    In any case maybe I didn't explain myself well.
    I'm not using the original variable screen, I have created one of my own and I refresh the data by calling the web template again with the new variables value in the URL.
    In that case the original template comes up without saving the current navigation.
    Shlomi

  • Trying to open a page in IE-tab using javascript, script type="text/javascript" window.location.href="chrome://coralietab/content/container.html?url=0,myurl" /script Error:Component returned failure code:0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]

    I am trying to open a page in IE-tab using javascript like this, <script type="text/javascript"> window.location.href = "chrome://coralietab/content/container.html?url=0,myurl" ;</script>.Error occured : [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::myurl :: load :: line 234" data: no] I have IE-Tab plug-in installed..when I open the same link manually in mozilla,it works fine and page gets opened in Ie-tab.

    The only way this might be possible is by using the HostContainer object
    to access the HTML page and do it from there.

  • Load XML content into HTML enabled TextField

    I'm trying to figure out how to use html such as <br />
    loaded from an XML element into a TextField.. if I use something
    like
    <desc>my description<br />line 2</desc> I
    get 3 nodes instead of one when loading the XML file. If I use
    something like <desc>my description&lt;br /&gt;line
    2</desc> then I get <br /> in the actual text.
    Can anyone clue me in as to how to store HTML in an XML
    element so I can load the content into a Dynamic TextField with
    HTML enabled?
    Thanks much!

    use the latter in your xml and use the htmlText property of
    your html-enabled textfield to display your text.

Maybe you are looking for