Using JavaScript & Dynamic Lists - ?? need help

Hello all! Sorry to post this under an unrelated topic (JSP & JSTL), but there wasn't a JavaScript forum.
Anyway, before I ask my questions...read the following:
You'll find the code for my example at the end of this post. Also, I've posted my code as html pages in here...but my original code was in the form of servlets.
Here's what I wanted to accomplish:
1) html page has a form with two select lists
2) select one option from the first select
3) javascript code takes care of populating the 2nd list with options stored in an array, based on the first selection made in the 1st list.
4) each <option>'s value is set to the page hello.html
Piece of cake! That all works, but here's the real issue:
Let's say you click on an option from the 1st <select> list, which populates the 2nd <select> list with some options. You then click on the 2nd box, select an option, and it jumps to hello.html.
Now you press the back button - here are some things I observed:
First, let me note, that for my example, I'm using car makes for the 1st list, and car models for the 2nd.
* notice that only the 1st select list is still showing the selection you made, but the 2nd one shows nothing. Plus, when you click on the 2nd list, all that is shown is, in my example, "Then a Model". Not the original options that populated this list, when you had selected a car make from the first.
*also, if you select "Then a Model" in the 2nd, it will error out, because there isn't a link set for that option. I would actually prefer that the page doesn't jump anywhere if "Then a Model" was to be selected. But I can probably fix that later.
* If you try to select the car make you had previously selected again in the 1st menu, it still shows the same thing in the 2nd. Not the car models that it showed you when you had first run the example.
*) You can get the model options for, just for example, "Acura" back into the 2nd, but you would have to select Audi or BMW and then select Acura again.
*) if you select the "Select a Make" option in the 1st, it doesn't display "Then a Model" in the second as I would like. But I can probably fix that later.
Now, here are my questions:
1) Does anybody know how I can keep the selections "selected" in the page, when a user comes back to it when they press the "back" button?
2) Do I have to store the options selected somewhere, so the page "remembers" what was selected?
3) Would it help if I used session tracking?
I was told that the problems I've described are because I've implemented a dynamic listbox.
The value is supposed to be lost if I move to the next page and then click back. Would any of you agree?
Any ideas/suggestions at all would be very much appreciated!
************************ HERE'S THE CODE **********************************
This is dynamiclists.html I've commented it probably more than necessary for all you skilled JavaScript programmers, but I thought it would help to have an explanation for each piece of code.
<html>
<head>
<script language=javascript>
//here I create the multi-dimensional array to hold my
//values for each make and model to be put into the
//lists
var cars = new Array();
cars['Acura'] = new Array('Legend');
cars['BMW'] = new Array('740i');
cars['Audi'] = new Array('A4');
//method used for my onChange event in the first select list (Make)
//method accepts the value of the selected index
function createModel(makeName) {
//variables used for short-cutting to form elements
//references the form
var myform = document.selections;
//Make selection list
var Make = myform.Make;
//Model selection list
var Model = myform.Model;
//holds the item selected in the first list -- ex. Acura or Audi
var makeName = myform.Make.options[myform.Make.selectedIndex].value;
//to be set to a new Option
var theOption;
//if Select a Make is selected, clear the Model select list, and just put
// Then a Model in it
if(Make.selectedIndex == 0) {
Model.length = 0;
Model.length = 1;
Model.options[0].text = "Then a Model";
Model.options[0].value="Then a Model";
// if you select Acura from Make
if(makeName == "Acura") {
// fill first position in Model select list with the Then a Model, so the
// user knows to select a Model after a Make
Model.options[0].text = "Then a Model";
Model.options[0].value = "Then a Model";
// loop through the array elements that match makeName (which for example
// could be Acura
for(var i=0; i<cars[makeName].length; i++) {
// create a new Option for each Model available
theOption = new Option(cars[makeName], i);
// put the Model into the Model select list starting at position 1, not 0 because
// position 0 is taken up by Then a Model that was set above.
// Thus why I put (i+1)
Model.options[(i+1)] = theOption;
// set each Model options link to hello.html, just for now.
Model.options[(i+1)].value="hello.html";
}//end for
}//end if
// repeat for BMW and Audi
if(makeName == "BMW") {
Model.options[0].text = "Then a Model";
Model.options[0].value = "Then a Model";
for(var i=0; i<cars[makeName].length; i++) {
theOption = new Option(cars[makeName][i], i);
Model.options[(i+1)] = theOption;
Model.options[(i+1)].value="hello.html";
}//end for
}//end if
if(makeName == "Audi") {
Model.options[0].text = "Then a Model";
Model.options[0].value = "Then a Model";
for(var i=0; i<cars[makeName].length; i++) {
theOption = new Option(cars[makeName][i], i);
Model.options[(i+1)] = theOption;
Model.options[(i+1)].value="hello.html";
}//end for
}//end if
}//end createModel
// this is for the onChange event in the Model selection list.
// this takes care of the jump when you click on a Model.
// you will be taken to hello.html, which has been set in each option above
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"';")
if (restore) selObj.selectedIndex=0;
</script>
</head>
<body>
<form name="selections">
<select name="Make" onChange="createModel(this.options[this.selectedIndex].value);">
<option value="Select Make" selected>Select Make
<option value="Acura">Acura
<option value="BMW">BMW
<option value="Audi">Audi
</select>
<select name="Model" onChange="MM_jumpMenu('parent',this,0)">
<option value="Then a Model" selected>Then a Model
</select>
</form>
</body>
</html>
***************************** END OF DYNAMICLISTS.HTML ***********************************
Here's my simple hello.html
<html>
<body>
Hello to all!
</body>
</html>

I have a html:
<html>
<head>
<script>
var store = new Array();
store[0] = new Array(
     'labas11',
     'labas12',
     'labas13');
store[1] = new Array(
     'labas21',
     'labas22',
     'labas23');
// Funkcija skirta dedant naujienu
// irasa formuoti sarasa kuriems vartotojams bus siunciama zinute
function populate()
     var box = document.forms[0].first;
     var number = box.options[box.selectedIndex].value;
     if (!number) return;
     var list = store[box.selectedIndex];
     if (list.length==null) return;
     var box2 = document.forms[0].second;
     box2.options.length = 0;
     for(i=0;i<list.length;i++)
          box2.options[i] = new Option(list,list[i]);
function addGroup()
var box = document.forms[0].first;
     var number = box.selectedIndex;
     if (number>-1)
document.forms[0].third.options[document.forms[0].third.options.length]=new Option('[G] '+box.value,document.forms[0].third);
function addUser()
var box = document.forms[0].second;
     var number = box.selectedIndex;
     if (number>-1)
document.forms[0].third.options[document.forms[0].third.options.length]=new Option('[V] '+box.value,document.forms[0].third);
function removeOne()
var box = document.forms[0].third;
     var number = box.selectedIndex;
     if (number>-1)
box.remove(box.selectedIndex);
function removeAll()
// alert(document.forms[0].third.options[0].text);
var box = document.forms[0].third;
     box.options.length=0;
function selectToList()
//this code selects all the elements in the select field
for(var i=0;i<document.forms[0].third.length;i++)
document.forms[0].third.options[i].selected=true;
alert(document.forms[0].third.options[i].text);
</script>
</head>
<body>
<form action='servlet/List' method=Post>
<select size=4 name="first" style="width:200px" onchange="populate()">
     <option value="0">html</option>
     <option value="1">css</option>
</select>
<select size=4 name="second" style="width:200px">
</select>
<select size=4 name="third" style="width:200px" multiple>
</select>
<input type=submit value=spausk onClick="selectToList();" />
</form>
<table>
<tr><td><button onclick="addGroup()"> &#302;d&#279;ti grup&#281; </button></td></tr>
<tr><td><button onclick="addUser()"> &#302;d&#279;ti vartotoj&#261;</button></td></tr>
<tr><td><button onclick="removeOne()"> �alinti </button></td></tr>
<tr><td><button onclick="removeAll()"> I�valyti </button></td></tr>
</table>          
</body>
</html>
and servlet:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class List extends HttpServlet
     public void doPost(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException
     { doAction(request,response);}
     public void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException
     { doAction(request,response);}
     public void doAction(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException
          response.setContentType("text/html;charset=windows-1257");
          PrintWriter out = response.getWriter();
     String[] strArray=request.getParameterValues("third");
          out.print("Value: "+strArray[0]);
So what is wrong because servlet prints bad value [object]
Thanks

Similar Messages

  • Can I create  a multi-selection list using a dynamic list of values?

    I'm reading section 19.7.3 from the dev guide - it explains how to create a selectOneListbox using a dynamic list of values. Is it possible to create a multi-select listbox from a dynamic list of values?
    What I would like to do - I have a read-only view object with a hard-coded query - I would like to display the results of the query in a dropdown list box, or dropdown list box with boolean checkboxes, to allow the user to select multiple items from the list. How can I accomplish this?
    thanks

    Hi JavaX,
    I don't know of any JSF components (at least not any ADF Faces components) that lets you do multiple selection in a drop-down. There is an af:selectManyListbox, but it does not render as a drop-down.
    John

  • ASP VBScript and ADDT Dynamic List Wizard HELP

    Using ADDT I've created a dynamic list in a membership area. How do I get that dynamic list to populate only the data for that particular member that is logged in. Any help would be so much appreciated as I have been trying to figure this out for days now.
    <br />
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <br />
    <!--#include file="../Connections/rentalpaypro.asp" -->
    <br />
    <!--#include file="../includes/common/KT_common.asp" -->
    <br />
    <!--#include file="../includes/tNG/tNG.inc.asp" -->
    <br /><%<br />'Start log out user<br />  Set logout = new tNG_Logout<br />  logout.setLogoutType "link"<br />  logout.setPageRedirect "../index.html"<br />  logout.Execute<br />'End log out user<br />%>
    <br />
    <!--#include file="../includes/tfi/TFI.asp" -->
    <br />
    <!--#include file="../includes/tso/TSO.asp" -->
    <br />
    <!--#include file="../includes/nav/NAV.asp" -->
    <br /><%<br />'Start Restrict Access to Page<br />  Dim restrict: Set restrict  = new tNG_RestrictAccess<br />  restrict.Init MM_rentalpaypro_STRING, "../"<br />'Grand Levels: Any<br />  restrict.Execute<br />'End Restrict Access to Page<br />%>
    <br /><%<br />' Filter<br />  Dim tfi_listLandlord_Property1: Set tfi_listLandlord_Property1 = new TFI_TableFilter<br />  tfi_listLandlord_Property1.Init MM_rentalpaypro_STRING, "tfi_listLandlord_Property1"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID", "NUMERIC_TYPE", "ContactInfoID", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID", "NUMERIC_TYPE", "RegistrationID", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber", "NUMERIC_TYPE", "StreetNumber", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetName", "STRING_TYPE", "StreetName", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.AptNumber", "NUMERIC_TYPE", "AptNumber", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.City", "STRING_TYPE", "City", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.State", "STRING_TYPE", "State", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.ZipCode", "NUMERIC_TYPE", "ZipCode", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent", "NUMERIC_TYPE", "MonthlyRent", "="<br />  tfi_listLandlord_Property1.Execute()<br /><br />' Sorter<br />  Dim tso_listLandlord_Property1: Set tso_listLandlord_Property1 = new TSO_TableSorter<br />  tso_listLandlord_Property1.Init "rslistLandlord_Property1", "tso_listLandlord_Property1"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.StreetName"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.AptNumber"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.City"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.State"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.ZipCode"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent"<br />  tso_listLandlord_Property1.setDefault "Landlord_Property.ContactInfoID"<br />  tso_listLandlord_Property1.Execute()<br /><br />' Navigation<br />  Dim nav_listLandlord_Property1: Set nav_listLandlord_Property1 = new NAV_Regular<br />  nav_listLandlord_Property1.Init "nav_listLandlord_Property1", "rsLandlord_Property1", "../", Request.ServerVariables("URL"), 10<br />%>
    <br /><%<br />Dim qry_contactinfo__MMColParam<br />qry_contactinfo__MMColParam = "1"<br />If (Session("kt_login_id") <> "") Then <br />  qry_contactinfo__MMColParam = Session("kt_login_id")<br />End If<br />%>
    <br />

    Use the session variable from the log in method (MM_Username as I recall) to create a recordset that you then use in the dynamic list versus using the whole table.

  • Creating 2D List - Need Help

    Hi all,
    I need help with creating a "ragged" 2D array. The situation is that the columns have a static length which I know in advance but the number of rows needs to be defined per coloum seperatly. i know that i can create a ragged 2D array by setting the rows and looping throuh the rows setting the length (i.e. number of columns) but I have the opposite values. is this possible??

    Number of rows per column? A 2d array is basically
    one column with M rows and each row is N items wide.
    So define one collection object, I'll use a List for
    the sake of argument. This is that one column with M
    rows. For each row, add a List as an element in this
    column, and add N elements to this row List. There
    you go, a variable column length and each row is of a
    variable length as well.The issue i have is when defining the 2d array i.e. lets say of type int
    int[][] array = new int[M][N]
    I do not know M but do know the value of N. only after I have defined this section I can then continue to define M for each N .. any ideas?

  • Help! I have a Used Mac Book Pro need help with apps update

    My ex bought me a mac book pro and purchased all of the apps and uploaded the apps under is apple id. I just recently update the new software now i can't get access to iPhoto, and other apps because its asking me for my password but his apple id coming up is there any way i re install these apps under my apple id. Please help I can used iPhoto.

    You cannot use or upgrade anything that is registered with his Apple ID. You must re-purchase it all using your Apple ID and your iTunes account. This includes the operating system as well. Essentially, you erase the drive and start from scratch. Here's how to get started:
    Install OS X Using Internet Recovery
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Internet Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.
    Partition and Format the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Install button. Be sure to select the correct drive to use if you have more than one.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    This should restore the version of OS X originally pre-installed on the computer. You can decide which apps you want to purchase (or download free) from the App Store where you will set up your own account and your own Apple ID if you don't have one.

  • I am unable to transfer my pictures from iphoto after editing back to my external hard disc. How do I do it. Previously I used Windows and this is the first time I am using a Macbook. Need help and tutorials.. Where can I find em..

    Hi there, I am new to Apple Iphoto. I am having lots of problems in transferring my edited photos back to my external Hard disc after editing. How am I able to do it. will it be able to open in Windows OS... Previously I was using Windows and now i m new in using the Apple OS.. Need guidance.. Would really appreciate if any1 of u guys could help me through. are there any other applications that I could use to edit pictures.

    Best if you try and explain what you are trying to acheive.
    Iphoto is a different paradigm than you're used to. I don't understand why you are trying to transfer your edited photos back to an external disk.
    There are tutorials here
    http://www.apple.com/findouthow/photos/
    Regards
    TD

  • Question about Dynamic Overclocking - Need help/advice

    Hello,
    I recently upgraded to version 3.9 bios on my MB (K8N SLI paltinum).
    I had DOT enabled before the upgrade, on 9% extra. this worked ok. as soon as a program required heavy CPU, DOT kicked in and give me a 9% boost. and it also cooled off, back to normal operations when the CPU was idle again.
    now, since the upgrade to 3.9, the DOT always stays at 9%? when booting up, when idling, always...? Is there a setting that I missed? or is it a bug in 3.9?
    --> after the upgraded I loaded the optimized defaults.
    thanx for any help.
    S.

    hi guys,
    thnx all for the updates. I'm currently using DOT on 9%. It runs rock stable. IIf I set it on 11%, no problems.
    C&Q is off, always was.
    The problem with DOT is, that it doesn't do what it should do. (in 3.9 bios). nl, when the CPU runs on 0% load, no Over-clocking is need.
    Any other settings that I should check?
    Do I need to turn on Q&C?
    thnx!

  • Use a dynamic list of email addresses to email a report via Business Objects Server 11

    Post Author: wolfgang666
    CA Forum: General
    I use Business Objects Server version 11 to distribute reports via email but was asked if there was a way to only send the reports to those people listed in the report (which changes daily) instead of the entire distribution list. I can create a list of email addresses as a variable within the report but can't find any way to pass it to the Business Objects server "To:" field located in the destination screen. I would expect to see some option for sending to some value located in the report but alas no such option is evident. This seems like a feature the product should be capable of doing as it is so basic. Any other way to do this that anybody can think of? Any help is greatly appreciated. Thanks.
    Matt Frazier

    Hi Alan,
    The simplest thing would be to simply use the Import Wizard to create a BIAR file and then back up the required CR's and instances to the BIAR file. So for instance you would use the "Import Folders and Objects" option. So the source system would be the system you are decomissioning and the Destination would be the BIAR file. Once that is done you can use the BIAR file to import the report content into another system in the future.
    <<Text removed>>
    Kind regards,
    John
    Edited by: Matt on Oct 10, 2011 10:20 AM

  • Static ip in workplace and dynamic otherwise need help

    Hi! I Have static ip address in my workplace and all other areas i use laptop is having dynamic ip address.
    I have tried configuring my static ip address in alternative configurations  option still doesnt help
    i have windows 7 
    please guide
    regards
    Aman

    Hi,
    So the situation is your workplace has a static IP address and the other places are using dynamic IP address?
    What do you want to achive here? Are we in a domain environment?
    Could you please tell more information for the network environment and your PC( Laptop ?) IP settings?
    Best regards
    Michael Shao
    TechNet Community Support

  • Using Switch With Double(Need Help)

    Hello,
    I want to write a program which says grades from numbers.For example;
    When i write 87,it has to say that 87=BB
    Grade system;
    AA =94 - 100
    BA =89 - 93
    BB =84 - 88
    CB =79 - 83
    CC =74 - 78
    FF =0-73
    and i wrote this;
    import javax.swing.JOptionPane;
              public class GradeCalculate {
                 public static void main(String[] args) {
              double value = Double.parseDouble(JOptionPane.showInputDialog ("Enter value\n"));
                        switch (value/10.0) {
                        case 10.0:  System.out.println("AA"); break;
                     case 9.9:  System.out.println("AA"); break;
                     case 9.8:  System.out.println("AA"); break;
                     //it is going like that 9.7, 9.6, 9.5... etc               
    }But i cant compile it.Where am i making mistake?How can i use double command with this program?I have to do this with using double and switch commands.
    Thanks for helping.
    Edited by: SuMMerMaN on Mar 10, 2010 12:14 PM
    Edited by: SuMMerMaN on Mar 10, 2010 12:14 PM

    SuMMerMaN wrote:
    Well,it says;
    possible loss of precision
    found:double
    required:int
    switch (value/10.0)
    ^but i couldn't solve my problem,i have to use double command and it says "required:int"This is telling you that what goes inside the parentheses in switch(...) must be an int. So you need to either supply an int value, or cast the value that you do supply.

  • Extracting Attrubutes using DOM API (I need help!!!!)

    Hi,
    I need some help on how to extract (or parse) the Attributes value in the XML using the DBMS_XMLDOM package.
    Here is the XML sample.
    <COMPANY>
    <DEPARTMENT DEPT="10">
    <EMP ID="123" NAME="JOHN" />
    <EMP ID="456" NAME="PETER" />
    <EMP ID="789" NAME="PAUL" />
    </DEPARTMENT>
    <DEPARTMENT DEPT="20">
    <EMP ID="987" NAME="SIMON" />
    <EMP ID="654" NAME="JAMES" />
    <EMP ID="321" NAME="ANDREW" />
    </DEPARTMENT>
    <DEPARTMENT DEPT="30">
    <EMP ID="129" NAME="JOHN" />
    <EMP ID="348" NAME="PETER" />
    <EMP ID="567" NAME="PAUL" />
    </DEPARTMENT>
    </COMPANY>
    BTW, we are using Oracle v9.2.0.4.0
    Thanks in advance

    The following procedure may help...
    procedure uploadFiles(FILE_LIST varchar2 default 'ls.xml', UPLOAD_DIRECTORY_NAME varchar2 default USER, REPOSITORY_FOLDER_PATH varchar2 default '/home/' || USER , BATCH_SIZE number default 1)
    as
    pathSeperator varchar2(1) := '/';
    DIRECTORY_PATH varchar2(256);
    SUBDIRECTORY_PATH varchar2(256);
    TARGET_FOLDER_PATH varchar2(256);
    TARGET_FILE_PATH varchar2(256);
    TARGET_FILE_NAME varchar2(256);
    RESOURCE_PATH varchar2(256);
    LAST_FOLDER_PATH varchar2(256) := ' ';
    sqlStatement varchar2(256);
    FILELIST_XML XMLTYPE := XMLType(bfilename(UPLOAD_DIRECTORY_NAME,FILE_LIST),nls_charset_id('AL32UTF8'));
    CONTENT_XML XMLType;
    result boolean;
    filecount binary_integer := 0;
    FILELIST_DOM DBMS_XMLDOM.DOMDOCUMENT;
    FILES_NL DBMS_XMLDOM.DOMNODELIST;
    DIRECTORY_NL DBMS_XMLDOM.DOMNODELIST;
    FILENAME_NL DBMS_XMLDOM.DOMNODELIST;
    FILES_NODE DBMS_XMLDOM.DOMNODE;
    DIRECTORY_NODE DBMS_XMLDOM.DOMNODE;
    FILE_NODE DBMS_XMLDOM.DOMNODE;
    TEXT_NODE DBMS_XMLDOM.DOMNODE;
    ENCODING_ATTR DBMS_XMLDOM.DOMATTR;
    REPLACE_ATTR DBMS_XMLDOM.DOMATTR;
    PATH VARCHAR2(256);
    FILE_NAME VARCHAR2(256);
    ENCODING_TEXT VARCHAR2(32);
    ATTR_VALUE VARCHAR2(256);
    REPLACE_OPTION BOOLEAN;
    REPLACE_DEFAULT BOOLEAN;
    DEBUG_BUFFER VARCHAR2(255);
    begin
    -- Create the set of Folders in the XDB Repository
    FILELIST_DOM := DBMS_XMLDOM.newDOMDocument(FILELIST_XML);
    DIRECTORY_NL := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(FILELIST_DOM,'directory');
    FOR i in 0 .. (DBMS_XMLDOM.GETLENGTH(DIRECTORY_NL) - 1) LOOP
    DIRECTORY_NODE := DBMS_XMLDOM.ITEM(DIRECTORY_NL,i);
    TEXT_NODE := DBMS_XMLDOM.GETFIRSTCHILD(DIRECTORY_NODE);
    DIRECTORY_PATH := DBMS_XMLDOM.GETNODEVALUE(TEXT_NODE);
    DIRECTORY_PATH := REPOSITORY_FOLDER_PATH || DIRECTORY_PATH;
    createDirectoryTree(DIRECTORY_PATH);
    END LOOP;
    -- Find the Local File System Path to the target Directory.
    select DIRECTORY_PATH
    into DIRECTORY_PATH
    from ALL_DIRECTORIES
    where DIRECTORY_NAME = UPLOAD_DIRECTORY_NAME;
    -- dbms_output.put_line('OS Root = ' || DIRECTORY_PATH);
    -- Load the Resources into the XML DB Repository
    FILES_NL := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(FILELIST_DOM,'files');
    FILES_NODE := DBMS_XMLDOM.ITEM(FILES_NL,0);
    REPLACE_DEFAULT := FALSE;
    REPLACE_ATTR := DBMS_XMLDOM.getAttributeNode(DBMS_XMLDOM.MAKEELEMENT(FILES_NODE),'replace');
    if not (DBMS_XMLDOM.ISNULL(REPLACE_ATTR)) then
    REPLACE_DEFAULT := xdb_dom_helper.varchar_to_boolean(DBMS_XMLDOM.getVALUE(REPLACE_ATTR));
    end if;
    FILENAME_NL := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(FILELIST_DOM,'file');
    FOR i in 0 .. (DBMS_XMLDOM.GETLENGTH(FILENAME_NL) - 1) LOOP
    FILE_NODE := DBMS_XMLDOM.ITEM(FILENAME_NL,i);
    TEXT_NODE := DBMS_XMLDOM.GETFIRSTCHILD(FILE_NODE);
    TARGET_FILE_PATH := DBMS_XMLDOM.GETNODEVALUE(TEXT_NODE);
    -- dbms_output.put_line('Source = ' || TARGET_FILE_PATH);
    TARGET_FILE_NAME := substr(TARGET_FILE_PATH,instr(TARGET_FILE_PATH,pathSeperator,-1)+1);
    -- dbms_output.put_line('File = ' || TARGET_FILE_NAME);
    TARGET_FOLDER_PATH := substr(TARGET_FILE_PATH,1,instr(TARGET_FILE_PATH,pathSeperator,-1));
    TARGET_FOLDER_PATH := substr(TARGET_FOLDER_PATH,instr(TARGET_FOLDER_PATH,pathSeperator));
    TARGET_FOLDER_PATH := substr(TARGET_FOLDER_PATH,1,length(TARGET_FOLDER_PATH)-1);
    ENCODING_ATTR := DBMS_XMLDOM.getAttributeNode(DBMS_XMLDOM.MAKEELEMENT(FILE_NODE),'encoding');
    ENCODING_TEXT := 'AL32UTF8';
    if not (DBMS_XMLDOM.ISNULL(ENCODING_ATTR)) then
    ENCODING_TEXT := DBMS_XMLDOM.getValue(ENCODING_ATTR);
    dbms_output.put_line('Encoding for ' || TARGET_FILE_NAME || ' = ' || ENCODING_TEXT);
    end if;
    REPLACE_ATTR := DBMS_XMLDOM.getAttributeNode(DBMS_XMLDOM.MAKEELEMENT(FILE_NODE),'Replace');
    REPLACE_OPTION := REPLACE_DEFAULT;
    if not (DBMS_XMLDOM.ISNULL(REPLACE_ATTR)) then
    REPLACE_OPTION := xdb_dom_helper.varchar_to_boolean(DBMS_XMLDOM.getValue(REPLACE_ATTR));
    end if;
    if (LAST_FOLDER_PATH != TARGET_FOLDER_PATH) then
    SUBDIRECTORY_PATH := DIRECTORY_PATH || TARGET_FOLDER_PATH;
    -- dbms_output.put_line('Directory = ' || SUBDIRECTORY_PATH);
    sqlStatement := 'create or replace directory SUBDIR as ''' || SUBDIRECTORY_PATH || '''';
    execute immediate sqlStatement;
    LAST_FOLDER_PATH := TARGET_FOLDER_PATH;
    end if;
    CONTENT_XML := xmltype(bfilename('SUBDIR',TARGET_FILE_NAME),nls_charset_id(ENCODING_TEXT));
    RESOURCE_PATH := REPOSITORY_FOLDER_PATH || TARGET_FOLDER_PATH || '/' || TARGET_FILE_NAME;
    -- dbms_output.put_line('Target = ' || RESOURCE_PATH);
    if (REPLACE_OPTION and dbms_xdb.existsResource(RESOURCE_PATH)) then
    dbms_xdb.deleteResource(RESOURCE_PATH);
    end if;
    result := dbms_xdb.createResource(RESOURCE_PATH,CONTENT_XML);
    filecount := filecount + 1;
    if (filecount = BATCH_SIZE) then
    filecount := 0;
    commit;
    end if;
    END LOOP;
    end;
    For instance code to get an 'encoding' attribute from a 'file' element

  • Using own domain - newbie needs help!

    I've never created a webpage before, so bear with me! I've started one in iWeb and purchased my own domain from GoDaddy.com. I changed the CNAME per the directions of iWeb/me.com. However, my page is not being published under the personal domain name I purchased. The domain name is showing up on me.com under my webpages. I've "Published All to .Mac" and when it asks me to go to my site after it's published, I get the generic GoDaddy parked site for my personal domain. What else do I need to do to get this working? Sorry to be so ignorant, but any help would be appreciated!
    Thanks!!
    Message was edited by: hokie1998

    What you need to do to set-up CNAME is to firstly enter your domain name into the personal domain name option of MobileMe. If you look, you will see that www is already there, so you don't need to enter this, just yourdomainname.com or whatever and then confirm it in the second box and click on done and it will be set.
    You then need to go to your control panel settings at GoDaddy, where you got your domain name from. What you need is the DNS settings and your domain name should already show there. All are slightly different, but what you then need to do is enter www, then pick CNAME from a drop down menu or complete it and then either web.mac.com or web.me.com to redirect your domain name. This then means that you domain name will be forwarded to your iWeb site at web.mac.com.
    If you want a simpler way to do it, you can just use web forwarding instead, which means that you don't need to complete the personal domain in your MobileMe account. All you need do is go to the web forwarding section of your control panel at GoDaddy and enter your domain name and then forward it to web.mac.com/username/sitename or web.me.com/username/sitename.
    Remember that for CNAME forwarding you always forward to web.mac.com and for just forwarding you would enter web.mac.com/username/sitename.
    CNAME forwarding can take up to 24 hours to take effect, so you could have a wait, although most hosting companies are a lot quicker than this.

  • JavaScript error. Need help!

    Hi,
    Since 2 weeks I encountered Javascript errors when starting Dreamweaver CS6.
    1st one - While Executing onLoad in BusinessCatalyst.htm, the following JavaScript error(s) occured: In file "BusinessCatalyst": bcinit is not defined.
    2nd one - The following JavaScript error(s) occured: At line 17 of file "C:\Program Files\Adobe\Adobe Dreamweaver CS6\Configuration\Shared\BC\JS\bc_ui_utils.js": MM.BC has no properties.
    I don't know what this means and how to solve it. I've tried deleting the cache file and re-installing the software, but that didn't help. So can anyone guide me through the steps I need to take?
    Thanks in advance!
    Erik

    Try #4 here Troubleshoot JavaScript errors | Dreamweaver CS4, CS5, CS5.5, CS6
    Otherwise #12 may be the go.

  • Problem - Define Forms for Check Deposit List - Need Help

    Hello Experts,
    I want to extend the logic of T Code FP20 (Prog RFKKCK01),
    Hence, I have created a 'Z' prog with the appropriate extension in the logic.
    Now to take these change effectively, i have made corrensponding changes in the attached SAP Script (FKK_CHECKDEPOS) also.
    Now, when I go to
    Contract Accounts Receivable and Payable -> Business Transactions -> Payments -> Processing Incoming and Outgoing Payments ->Define Forms for Check Deposit List.
    In this, I create a new Entry after removing the existing Entry of the same Company Code [1000     | ZRFKKCK01 | SapScript | ZFKK_CHECKDEPOS ]
    it gives me an Error "Specify the key within the work area".
    Specify the key within the work area
    Message no. SV033
    Diagnosis
    You have attempted to create an entry whose key is not in the range defined for this area.
    System Response
    The entry cannot be created.
    Procedure
    Please check your entry.
    Please Help me solving this problem.
    Thanks!!

    Thanks sbaranga. This code won't work for me.
    <select>
    <option value="P"if (statusIndicator.equals("Pending")){    selected}>
    <option value="A"if (statusIndicator.equals("Approved")){    selected}>
    </select>
    In above code statusIndicator is ID I believe. I need to show selected item based on statusIndicator in database. Also it has to pass updated status to database incase if user changes status thru form.
    If they select Pending then "P" will be passed to servlet and if they select Approved then it will pass "A" to servlet.
    I will be receiving "A" or "P" from database when I am trying to retrive status value from database. Based on value "A" or "P" I need to change selected information on form.
    Update and Retive form are same. this one form does everything display and update.
    I hope this help to understand my question.
    If you have any question then email me at [email protected]
    Thank you.

  • ITunes .dll error.  I can't use, uninstall, install iTunes - NEED HELP!

    I can't even start up iTunes anymore. I get "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience." I can get details on the error but it's all Greek to me. Any insights/thoughts? Your help would be most appreciated!
    ibm t40   Windows XP Pro  

    If iTunes is crashing, why don't you send a crash log to those lazy Apple engineers.
    Typically, you'll need to configure Dr. Watson on your PC in order to generate crash logs. Windows start menu -> Run. Type in "cmd". Hit return. At the prompt in the command line window that comes up, type in
    drwtsn32 -i
    And hit return.
    This will create crash logs in Documents And Settings\All Users\Application Data\Microsoft\Dr Watson\. There'll usually be a file in here called "drwtsn32.log" If there's already a file there, it most likely has multiple crash logs in it (new crash logs are just appended to the end of the file). So, delete this file. This will make sure you're not sending extra information I don't need. These crash logs are text files, so you can open them in notepad or whatever to see what information you're sending.
    So, get the machine setup to collect crash logs, do the thing that makes iTunes crash. You need to send that file to our buddy Roy. Make sure that you include:
    (1) the drwtsn32.log file.
    (2) the link to this thread.
    (3) a one line description of your problem, i.e. "iTunes crashes on launch".
    (4) the username that you're using here in the discussion boards.
    Roy is getting a little swamped with messages and needs to make sure he gets all the information. And if he doesn't get that information, the message is just going to get dropped on the floor.

Maybe you are looking for

  • Recording from FMLE to disk - jagged edges and combing..

    I'm experimenting with recording straight to hard drive using FMLE 3.2. I have to film a conference using 4 cameras ( Sony A1U's ) The recordings will be required almost immediately so I wont have any options to bring the footage into Premiere Pro an

  • SAPInst Export Error during Unicode Conversion

    Hello, I started SAPInst, to export the source instance (for unicode conversion). During the export preparation phase, I get the following error (in SAPInst) ERROR CJS-00030: Assertion failed: in component: NW_getDBInfo step: fillContextat this point

  • Module Pool  - I/O fields - Two different kinds of display

    Hello Everyone, In order to distinguish the texts in I/O (default and entered by the User), I am trying to change the Font / Color etc. in I/O fields I have tried implementing class CL_DD_AREA but that doesnt fulfill all the charateristics required f

  • Arabic Text with SKR Headr1 Font

    I have installed Indesign CC, Added New Arabic Text with SKR Headr1 Font, but arabic text is scrambled, Tried with CS5/6, same issue, I Have i7-Win7x64 Arabic Enabled

  • Cross Database Insert on rows

    Is there a standard way to insert rows into a table and get the last inserted value for the identity column back ? e.g. Oracle does'nt support IDENTITY or AUTONUMBER on insert as a sequence is desired. This creates a huge problem for writing cross da