Doubt about  a null value assigned to a String variable

Hi,
I have a doubt about a behavior when assigning a null value to a string variable and then seeing the output, the code is the next one:
public static void main(String[] args) {
        String total = null;
        System.out.println(total);
        total = total+"one";
        System.out.println(total);
}the doubt comes when i see the output, the output i get is this:
null
nulloneA variable with null value means it does not contains a reference to an object in memory, so the question is why the null is printed when i concatenate the total variable which has a null value with the string "one".
Is the null value converted to string ??
Please clarify
Regards and thanks!
Carlos

null is a keyword to inform compiler that the reference contain nothingNo. 'null' is not a keyword, it is a literal. Beyond that the compiler doesn't care. It has a runtime value as well.
total contains null value means it does not have memory,No, it means it refers to nothing, as opposed to referring to an object.
for representation purpose it contain "null"No. println(String) has special behaviour if the argument is null. This is documented and has already been described above. Your handwaving about 'for representation purpose' is meaningless. The compiler and the JVM don't know the purpose of the code.
e.g. this keyword shows a hash value instead of memory addressNo it doesn't: it depends entirely on the actual class of the object referred to by 'this', and specifically what its toString() method does.
similarly "total" maps null as a literal.Completely meaningless. "total" doesn't 'map' anything, it is just a literal. The behaviour you describe is a property of the string concatenation operator, not of string literals.
I hope you can understand this.Nobody could understand it. It is compete nonsense. The correct answer has already been given. Please read the thread before you contribute.

Similar Messages

  • How to find out the type of the value stored in a string variable?

    Hi,
    How do i find out the type of the value stored in a string variable?
    for example,
    I have a string variable str, in which the following type of values wil be stored
    1) Intger
    2) Long
    3) boolean
    4) Char
    Is there any method to find out the type of the value, anything like str.getType()?. Please kindly help me. Thanks in advance.

    Hi All, i'm sorry for the double posting, by mistake it occured.
    Thanks for your replies, i have a string variable str, in which the value is stored and i have another string variable type, in which the type of the value is stored.
    For example,
    String str = "15";
    String type = "Integer";
    Is there any way to verify whether the value stroed in str is of type stored in the variable 'type'. I want to write a method of type boolean, it will throw true of the value stored in str is of type 'type'. Thanks

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Is there an way to get the value of a local string variable from core dump?

    Hi All,
    Please help me on this, How to extract the string variable content from the core file.
    During core file analysis using dbx, it puts value as CLASS against string local variables.
    But I need to know the exact value during the core dump.
    I'm able to print other than string variables.
    Is this possbile using dbx or is there any other tool can help me on this.
    Thanks in advance, please find the code details below:
    here is my core details:
    (dbx) where -h
    current thread: t@74
    [1] __lwp_kill(0x0, 0x6, 0x217b8, 0x7f950b94, 0x2, 0x7f0fb944), at 0x7f99fb84
    [2] raise(0x6, 0x0, 0x7f0fb958, 0x7f6a5434, 0x1, 0x7f0fb9a4), at 0x7f950b9c
    [3] abort(0x7f6bf0f8, 0x4, 0x7f6bf0b8, 0x15360, 0x1, 0x7f6bf0f8), at 0x7f936d10
    [4] exregister(0x7f6bf0fc, 0x4, 0x7f6bf0b8, 0x15360, 0x1, 0x7f6a5048), at 0x7f6a504c
    [5] exregister(0x7f6bf0f8, 0x7f6a505c, 0x7f6bf0f8, 0x7f6bb080, 0x0, 0x1), at 0x7f6a5060
    [6] exregister(0x7f0fbb28, 0x66bd8, 0xe4fd0, 0x7f6bb080, 0x7f6ba780, 0x1), at 0x7f6a4fd8
    [7] 0x7f6a5edc(0x7f6bae64, 0x0, 0x66bd8, 0x14cb8, 0x14928, 0x0), at 0x7f6a5edc
    =>[8] AreaManager::commitCombine(this = 0xe5234, parsedSetName = CLASS), line 369 in "AreaManager.cc"
    [9] TaskDispatcher::combineParsedSet(parsedSetName = CLASS), line 113 in "TaskDispatcher.cc"
    [10] CombineExecutor::run(this = 0x1312d8), line 159 in "CombineExecutor.cc"
    [11] thread_body(threadObj = 0x1312d8), line 35 in "ThreadUtils.cc"
    (dbx)
    (dbx) dump
    parsedSetName = CLASS
    parsedSetCombinedName = CLASS
    parserSetBuiltName = CLASS
    this = 0xe5234
    (dbx)
    (dbx) print parsedSetName
    dbx: cannot access address 0x7f6690f4
    (dbx)
    BR//Sahoo

    When I was running in a higher version, it gives follwing error:
    A loadobject was found with an unexpected checksum value.
    When using the same core dump binary, the result are different than the locally build binary
    This is the error it pointing now:
    if ((ptr = (CHAR *) malloc((unsigned int) size)) == NULL)
    (dbx) proc -map
    Loadobject mappings for current core file:
    0x00010000 /usr/omc/1.8.0.0.56/bin/PmLoader
    0x7fb80000 /usr/lib/libaio.so.1
    0x7fb30000 /usr/lib/libm.so.1
    0x7fbfa000 /usr/lib/libdl.so.1
    is being filtered by: /usr/lib/ld.so.1
    Warning: checksum in file(a5bd) doesn't match image(a5bf)
    0x7faf0000 /usr/lib/libelf.so.1
    Warning: checksum in file(38a7) doesn't match image(38a9)
    0x7fad0000 /usr/lib/libsocket.so.1
    0x7fa00000 /usr/lib/libnsl.so.1
    0x7f900000 /usr/lib/libc.so.1
    is being filtered by: /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1
    Warning: checksum in file(3b8c) doesn't match image(3ec6)
    0x7f890000 /usr/informix/lib/esql/libthsql.so
    0x7f830000 /usr/informix/lib/libthasf.so
    0x7f7b0000 /usr/informix/lib/esql/libthgen.so
    0x7f770000 /usr/informix/lib/esql/libthos.so
    0x7f700000 /usr/informix/lib/esql/libifgls.so
    0x7f9e0000 /usr/informix/lib/esql/libifglx.so
    0x7f6d0000 /usr/lib/libthread.so.1
    0x7f500000 /usr/lib/libCstd.so.1
    Warning: checksum in file(1fc4) doesn't match image(3f67)
    0x7f6a0000 /usr/lib/libCrun.so.1
    Warning: checksum in file(1a8d) doesn't match image(b1ea)
    0x7fba0000 /usr/lib/libw.so.1
    is being filtered by: libc.so.1
    0x7f4e0000 /usr/lib/libmp.so.2
    0x7f4a0000 /usr/lib/cpu/sparcv8plus/libCstd_isa.so.1
    Warning: checksum in file(0fc3) doesn't match image(27d6)
    0x7f9d0000 /usr/platform/sun4u-us3/lib/libc_psr.so.1
    0x7f410000 /usr/lib/nss_files.so.1
    0x7fbb0000 /usr/lib/ld.so.1 [LM_ID_LDSO]
    Warning: checksum in file(f2f2) doesn't match image(2a40)
    dbx ./PmLoader ./core
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc
    Reading PmLoader
    core file header read successfully
    Reading ld.so.1
    Reading libaio.so.1
    Reading libm.so.1
    Reading libdl.so.1
    Reading libelf.so.1
    Reading libsocket.so.1
    Reading libnsl.so.1
    Reading libc.so.1
    Reading libthsql.so
    Reading libthasf.so
    Reading libthgen.so
    Reading libthos.so
    Reading libifgls.so
    Reading libifglx.so
    Reading libthread.so.1
    Reading libCstd.so.1
    Reading libCrun.so.1
    Reading libw.so.1
    Reading libmp.so.2
    Reading libCstd_isa.so.1
    Reading libc_psr.so.1
    Reading nss_files.so.1
    WARNING!!
    A loadobject was found with an unexpected checksum value.
    See `help core mismatch' for details, and run `proc -map'
    to see what checksum values were expected and found.
    dbx: warning: Some symbolic information might be incorrect.
    t@1 (l@1) terminated by signal BUS (invalid address alignment)
    0x7f947974: t_delete+0x0068: clr [%o1 + 8]
    Current function is Malloc
    40 if ((ptr = (CHAR *) malloc((unsigned int) size)) == NULL)
    (dbx)
    (dbx) where -h
    current thread: t@1
    [1] t_delete(0x17c980, 0x470, 0x1ef778, 0x7f9bc000, 0x0, 0x0), at 0x7f947974
    [2] mallocunlocked(0x414, 0x0, 0x0, 0x7f9bc000, 0x0, 0x0), at 0x7f947004
    [3] malloc(0x414, 0xebae0, 0x8, 0xffbfc9a8, 0xffbfc9a0, 0x1a3791), at 0x7f946e38
    =>[4] Malloc(size = 1044U), line 40 in "Malloc.c"
    [5] Drain_Socket(sc = 0x1ab100, fd = 10, block = 0xffbfce44), line 1648 in "ipc_sockio.c"
    [6] Sockio_Refresh(instance = 0x1ab100, fd = 10U, readable = 1, writeable = 0, block = 0xffbfce44), line 3465 in "ipc_sockio.c"
    [7] do_Refresh(cid = 10U, readable = 1, writeable = 0, block = 0xffbfce44), line 1238 in "ipc_IO.c"
    [8] IO_Refresh(block = 0, file_descriptor = -1), line 685 in "ipc_IO.c"
    [9] ipc_receive_message(gid = 0xffbfcf88, reply = 0xffbfd080, buffer = 0x11ae08 "", len = 0xffbfcf34, block = 0), line 313 in "ipc_services.c"
    [10] IPCProcessor::receiveMessage(this = 0x1172d0, channelID = 2U, pReplyChannelID = 0xffbfd080), line 312 in "IPCProcessor.cc"
    [11] IPCProcessor::mainLoop(this = 0x1172d0, pHandler = 0xf9c28), line 203 in "IPCProcessor.cc"
    [12] IPCService::mainLoop(pMediator = 0x1172d0, pHandler = 0xf9c28), line 51 in "IPCService.cc"
    [13] main(argc = 3, argv = 0xffbfe1f4), line 91 in "PmLoader.cc"
    I got another instance of core dump in same m/c
    Edited by: chittusun on Nov 5, 2008 5:19 AM

  • Assign Prompt from string variable recieved from Enterprise Info

    We have a customer that would like all their incoming scripts to share a common afterhours greeting.  They want to have a specific menu of options one of which is the hours of operations.  Each of these location's hours of operations could and most likely are different.  I am able to send the value of which "location" was orginally called into the common afterhours script from there I would like to set the afterhours prompt to the appropriate recording.  I know I could do this with a series of IF THEN's but they have over 25 locations that might ring into this common afterhours greeting.  What I would like to be to do is the following:
    I am using the CRS editor for this:
    Set the Location variable to the result of the Enterprise call info that is recieved.
    Menu,
    Press 1 for Something
    Press 2 for Something Else
    Press 3 for hours of operation
      Is there a way here to simply play a prompt that was "set" by the value of the Location variable?
    Please let me know if you need more information...
    Thanks,
    Joe

    Hi
    If you have 25 other scripts each setting this enterprise data to a particular value, why not just play the location dependant part in those 25 scripts, before sending to the common script for the 'generic' treatment that follows?
    If you want to play the prompt that matches the ent data, just set a String to the value of the ent data and then use a 'Play Prompt' and put in
    varname + ".wav"
    In the prompt field.
    Aaron
    Please rate helpful posts..

  • Passing null value to stored procedure

    I am calling a stored procedure from ssis package. In my stored procedure I have parameters which is set to default value of null i.e if nothing is passed I need to assume the value of parameter to be null. 
    In ssis package I created a variable its a datetime variable but when I dont pass anything or blank 
    it automatically gets some date but instead I want it to pass NUll.
    Thank You for the help

    Hi Rama,
    SSIS evaluates null value in a date type variable as “12/30/1899 12:00:00 AM” by default. As long as the date type of the variable is date, it always gives “12/30/1899 12:00:00 AM” instead of null. This behavior still exists in SSIS 2012. So, I am afraid
    that you have to modify your stored procedure to yield to this by design behavior of SSIS.
    If you have concerns, I would suggest you submitting a wish at https://connect.microsoft.com/sql. 
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Regards,
    Mike Yin
    TechNet Community Support

  • How to assign NULL value to an ITEM in Forms Personalization?

    Hi,
    how to assign NULL value to an ITEM in Forms Personalization?
    please suggest me.
    Thanks

    I don't know what your form personalization does and maybe I misunderstand you ...
    Try
    :item_name := null;

  • About xml and null values in 10g

    Hi, I have an UCM GetFile webservice component wich receives 4 arguments, two of them are null values (rendition and extraPops), and the xml request generated by obpm is:
    <GetFileByName xmlns="http://www.stellent.com/GetFile/">
      <dDocName>V_123410</dDocName>
      <revisionSelectionMethod>latestReleased</revisionSelectionMethod>
      <rendition/>
      <extraProps/>
    </GetFileByName>The problem is: On UCM web service, an empty tag like <rendition/> is treated like a "empty string" value, instead of a null value, and then the response i get isn't the expected.
    What I want do to is change this behavior, and when I put null values in requests, the obpm should not write those tags. Is that possible?
    Should be like that:
    <GetFileByName xmlns="http://www.stellent.com/GetFile/">
      <dDocName>V_123410</dDocName>
      <revisionSelectionMethod>latestReleased</revisionSelectionMethod>
    </GetFileByName>Thanks!

    Hi,
    I have question regarding aggregates. It's possible to read data from BW aggregates? We have webi reports on a SAP BW multi cube and we would like to optimize retriving query.
    >> Because you are using the BW Query as the source all the items that you have done so far in terms of aggregation, indexing, ... is all valid and there are no specific steps required to leverage it with Web Intelligence. Make sure the aggregates are "correct" meansing that they do reflect what you are asking for in the Web Intelligence query panel
    How can we filter in webi query null (#) values. If we create condition that some variabe is diffrent from # we still get null (#) values in report.
    >> You should be able to create a variable. in case you tried that already could you be more specific ?
    thanks
    Ingo

  • Assigning a null value

    Hi ,
    I have a consuming web service. Initially while sending a request I have to pass null value to certain parameters. But the parameters are of type string and Im unable to do this. I tried the syntax clear var with null, but this supports only character not string. Please help in this.
    Thanks,
    Sarath.C

    Just to close the thread.

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

  • Null value in poplist

    Hi,
    I'm using forms6i, I'm having a poplist in my form, which i populate in when-new-form-instance.
    So when i open the form, and try to select one value, i'm seeing one null value, and if i select one value from list and again try to change the value then the previous null value is gone.
    So to avoid that in when-new-form-instance itself , i assigned one value to the poplist using Get_List_Element_Value.
    But the problem is since i'm assigning value, the form goes in insert status, and so even if i dont enter any valuees and try to exit, it is asking Close Form? (because i have few non-null items also).
    How can i get one safe solution (like as it work when we assign some static values to the poplist).
    ie i dont want nulls to be seen iin the list also i dont want the close form? message
    I tried one solun by setting the form status as new again in w-n-f-i. But since i have multirecord block, this problem comes with every record.
    Please suggest one better solution

    Hi Divya
    why don't u try putting the same code of the w-n-f-i in when-validate-record or when-new-record-instance may be it work...
    if not working pls share us the code what about an example:
    declare
    rg_name varchar2(40):='r_area_record1';
    rg_id Recordgroup;
    LIST_ID ITEM;
    errcode NUMBER;
    begin
    rg_id:=Find_Group(rg_name);
    if Id_null(rg_id)
    then
    rg_id :=Create_group_from_query(rg_name,
    'select VC_ID , research_area from research_info
    where proff_id= 9');
    LIST_ID:=FIND_ITEM('TRY_BLOCK.TRY');
    end if;
    errcode:=populate_group(rg_id);
    POPULATE_LIST(LIST_ID,RG_ID);
    end; Regards,
    Abdetu...
    Edited by: Abdetu on Jan 27, 2011 2:30 AM

  • NULL value in GeoRaster cells?

    Hi all,
    How to store a NULL value in GeoRaster cells ? For example i need to store raster data of NOAA image of continent of Australia, with null value for cells in the surrounding ocean.
    Given the cell depth is 8 BIT U, then the range will be 0 to 255. But i need to assign NULL instead of any value within the range, to ocean cells.
    I think the .setBlankCellValue does not help for this.
    I do not think Oracle GeoRaster does not recognize Null cell value. But i don't know how.
    The geoRaster documentation explain about SDO_GEOR.getNODATA, but how to set it ?
    Or do i have to make some kind of alpha layer for this purpose ?
    Please advise
    Thank you for reading and commenting,
    =Damon

    Jeffrey,
    >
    1. setup NODATA value(s) or NODATA value
    ranges. for this you can call:
    sdo_geor.addNODATA
    sdo_geor.getNODATA
    sdo_geor.deleteNODATA.
    this case, the NODATA value(s) must be in the range
    of the cellDepth. in your case with 8bit unsigned, it
    must be an non-negative integer in [0,255].
    your are talking about NOAA image, I would suggest
    you use 0 (zero) as NODATA for the ocean area. In
    general, the good image pixels would not be zero.The thing is i need to preserve the whole range of possible value of the cell depth meaningful. Probably best example as oppose to NOAA images, is image derived from raster algebra (eg. substraction).
    So i was considering the rest of your suggestion. Bitmap mask or alpha channel might help, BUT
    among
    sdo_geor.addNODATA
    sdo_geor.getNODATA
    sdo_geor.deleteNODATA
    sdo_geor.setBitmapMask
    sdo_geor.getBitmapMask
    sdo_geor.mergeLayers
    ALL are available in 11gR1 while only the sdo_geor.getNODATA that is available in 10gR2 (the one am using); correct me please. (this is based documents of both versions)
    Are you saying that 10gR2 is too obsolete for these, and that i shud upgrade to 11gR1 ?
    Please advise.
    ==================
    Other than general requirement for raster in geospatial, that raster should provide NODATA or null value; my specific aim is for (again) focal operation of geoRaster. For example :
    - an image of 512 rows x 1024 columns x 1 layer as input
    - processed by focal operation (or filtered) by 3 x 3 filter, result is the same size but cells in the row 0, row 511, column 0, and column 1023 ALL have NODATA value
    - similarly by 5x5 filter, row[0,1,510,511] and column[0,1,1022,1023] ALL have NODATA value
    hope this helps,
    JeffreyMany thanks and cheers
    =Damon

  • Form displays NULL values

    A page is using PL/SQL script to display data. There are 2 display variables. Instead of bringing initial set of data, it displays NULL values. It "fixes" itself after changing variable values from a drop down menu. Why is that and how to fix it?

    If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
    Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
    #Define at beginning of script
    $hashtable = @{}
    $OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Exclude NULL values from SUM and AVG calculation

    Hi,
    I have column in report that contains some NULL values. When i perform SUM,MAX,MIN or AVG calculation on this column the NULL values are treated as '0' and included in calculation. Is there any way to exclude them while calculating aggregate functions? 
    As a result MIN calculation on values (NULL,0.7,0.5,0.9) gives me output as 0 when it should have been 0.5 
    Can someone please help ?
    Thanks and Regards,
    Oliver D'mello

    Hi Oliver,
    According to your description, you want to ignore the NULL values when you perform aggregation functions.
    In this scenario, aggregate functions always ignore the NULL values, because their operation objects are non-null values. So I would like to know if you have assigned “0” for NULL values. I would appreciate it if you could provide some screenshots about
    your expressions or reports.
    Besides, we have tested in our environment using  Min() function. The expression returns the minimum value among the non-null numeric values. Please refer to the screenshots below:
    Reference:
    Min Function (Report Builder and SSRS)
    Aggregate Functions Reference (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Assign to a globa variable value from html variable.

    I need to assign to a global varaible say pkg1.var1 a value from the form.varaible.value
    how can it be done.
    The code looks like
    htp.p('<form name="f_a" method="get" >');
    htp.p( 'Your ref. nr.: ');
    htp.p('<input type="text" name="f_var1" maxlength="25" onChange="alert(''Your new reference num is ''+f_a.f_var1.value);" value="'||r_offerte.cusrefnur||'">');
    pkg.var1:='f_a.f_var1.value';
    htp.p('</form>');
    This code does not work and the value assigned is null;
    Thanks in advance.

    Hi,
    this forum is about Oracle Forms. maybe you try this in the database forum or Portal.
    Frank

Maybe you are looking for