Why javascript can't show right value under struts?

I have a <html:select>,and when change the value of select,alert the current selected value,such pages include following value:
PageID pageName
1      Page 1
2        Page 2
3       �Page 3
<html:select property="pageID" size="1" onchange="javascript:alert(this.options[this.selectedIndex].value)">
<logic:iterate id="b" name="pages" type="com.PageID">
<html:option value="<bean:write name='b' property='pageID'/>"><bean:write name="b" property="pageName"/></html:option>     
</logic:iterate>
</html:select>when i change the value of select,it don't show the right value,it should show 1,2 or 3,but it only show
<bean:write name='b' property='pageID'/>
why javascript don't show right value? How to show correct value of select?
Thanks

Working as intended !
Its not your javascript its your JSP is wrong
<html:option value="<bean:write name='b' property='pageID'/>">is bad JSp syntax you cannot nest tags like that.

Similar Messages

  • Why Javascript can't get value in Struts?

    I have a button in Struts,when click this button,it will show a value in Struts,like follows:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="form" %>
    <script language="JavaScript">
    function a(){
    alert(username.value);
    </script>
    <form:form action="/register">
    UserName:<form:text property="username"/><br>
    enter password:<form:password property="password1"/><br>
    re-enter password:<form:password property="password2"/><br>
    <form:hidden property="abc" value="3"/><br>
    <form:button property="button" value="Test" onclick="a()"/>     
    <form:submit value="Register"/>
    </form:form>
    But when I click Test button,it can't show the value of parameter "username",why? How to show the value of it?
    I have a another question,how many attribute of the taglib <form:>? Is there a document for it?
    Thanks!

    But when I click Test button,it can't show the value of parameter "username",why? How to show the value of it?
    Paz>>
    <script language="JavaScript">
    function a(){
    alert(document.forms[0].username.value);
    </script>I have a another question,how many attribute of the taglib <form:>? Is there a document for it?
    Paz>>
    http://struts.apache.org//struts-doc-1.1/userGuide/struts-html.html

  • How can i add two values under the same property?

    Hi all,
    How can i add two values under the same property name in a
    prop list? For example:
    [question1: "item1","item2", question2: "item3","item4"]
    To be more precise, i am creating a property list and I want
    whenever a two values have the same property name to be added int
    he list under the same property. For example:
    gMyList.AddProp (#""&question&"" & x,
    member("input").text)
    question is a variable that is updated fromt he user's input.
    Now, whenever somethign like this happens:
    question = "question1"
    member("input").text = "five"
    question = "question1"
    member("input").text = "six"
    I want to output list to be:
    [question1: "five","six"] and so on
    Any ideas?

    Maybe you could make each property a list (so you have a
    property list full
    of lists), and add multiple values to the list held in a
    particular
    property?
    Cheers
    Richard Smith

  • How can we show selected values of a tree in a selectmanylistbox

    how can we show selected values of a tree in a selectmanylistbox??

    Hi,
    you can use a reference to a RichTree component instance and call  getSelectedRowKeys on it. The selected rowKey then allow you to look-uo the nodes in the tree. You can use a custom selection listener on the tree to be notified about each selection. There also is an API for the de-selected row keys, which you need to remove nodes from the select many list. The select many list will get its data from a managed bean in view scope (so the values survive subsequent requests)
    Frank

  • How can i show a value into a MessageStyledText

    Dear all,
    Suppose i have a value in a variable i.e. number=10;
    how can i show this value into a MessageStyleText when page loads.
    please suggest.

    Gyan wrote:
    Mofizur,
    Get the value from the variable & Use the below code in PR.
    OAMessageStyledTextBean processCodeBean = (OAMessageStyledTextBean)webBean.findChildRecursive("<Replace with Bean Id>");
    if(processCodeBean!=null)
    processCodeBean.setText(pageContext,null);
    }Regards,
    GyanString employeeNumber = "10";
    processCodeBean.setText(pageContext,employeeNumber);
    OR
    processCodeBean.setValue(pageContext,employeeNumber);
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Why i can not click right mouse on desktop

    why i can not click right mouse on desktopwhy i can not click right mouse on desktopwhy i can not click right mouse on desktopwhy i can not click right mouse on desktop

    Does it work if you hold down the control key and left-click?
    Does it work if you log into another user account?
    Does it work if you boot into Safe Mode?
    OS X: What is Safe Boot, Safe Mode? - Apple Support

  • Output Preview does not show right values of Spots

    I have a document created in InDesign. It contains only 1 spot color (no CMYK). Acrobat shows worng spot values in Output Preview (100% for 100% spot, but 4% for 10% spot. Pitstop shows the right value. Can you tell me what is the problem?

    Hi Lisa,
    First you know for which transaction you want to print the form. For example if it Purchase Order then Transaction is ME22n or ME23n .
    The error you are getting might be because of one of the following reason.
    1) The output you are using should be configured for particular order number .For example if You want to print the form for a PO number 40000020 For this you must have configured output type in the messages of that order number.
    Go to ME22n give the order number  and press enter . In the application tool you can find messages button just click on that and it wil take you to other screen where you can give putput type print medium and printer in Comunication method and in firther data give  start immediately
    2)Let us suppose it was configured then the output must have configured properly.
    Thanks,
    Nageswar

  • Bug in full screen slide show: Speed-values under 1.0 don't work, they will be zero. Maybe a german problem because of ","?

    I wan't to do a full screen slide show with changing images under one second. But this doesn't work because every value under 1 will be 0. Maybe this is a german problem because we use "," instead of a ".". But I can't use ".", the field doesn't allow this. Is there a workaround or a bugfix?
    Thanks

    With any SSD, step #1: make sure the firmware is current.
    How you clone or install the OS also can differ.
    Linc has a 2008 and 10.8.2 but then I would expect his system to be rock solid. Same cannot be said for more than a few 3,1 owners that... all the issues with power management and panics vanish if they go back or dual boot and keep both, when they use 10.6.8 instead. And of course ML and Lion dropped support for PowerPC code, drivers - a good reason to do a clean install and not carry any older apps, drivers and plugins with the new system.

  • Why EBELP can not show normal in Table Control ?

    Dear All,
        I used table control in screen. And put some fields such as Material, PO, PO item,
    When user input the material, and pressed enter, then can call the PO and PO item into internal table. At screen, the PO can show normal, but the PO item show is u20180u2019.but the internal table have value.
    Why the PO item canu2019t show normal?
    Please help me?

    I set the EBELP in table control farmat is NUMC and CHAR also can't show normal
    I know it ,it must set the FIELD module check.
    Edited by: sun on Apr 11, 2009 3:56 AM

  • How can I show a value according to the position of the mouse arrow ?

    Hi Everyone,
    I am changing the color of the background of some indicators according to temperature measures. Each background is linked to one temperature. I would like to show the value of a temperature when passing the arrow of my mouse over the indicator. I don't want to over charge the Front Diagram with all of the temperatures.
    Is this possible? The temperature could appear in a unique and fixed indicator, or linked to the arrow,...
    Any help would be great,
    Thanks,
    User
    Solved!
    Go to Solution.

    Hi Ravens and Dan,
    Thanks for your answers.
    Ravens, I would rather not use the arrow position because I need to do this overs 100 indicator, and that would be a bit long. Added to that if I need to change the positions of the indicators (whch I will) that would mean to redefine the positions of the indicators....But perhaps your solution is the only possible?
    Dan, I have taken out and simplified the piece of my program. Setting the value of the indicator to transparent except when the mouse is over the indicator could be an example of presentating the values but I still don't know how to this (without having to define the position of each box)
    Thanks again
    User
    Attachments:
    forum 14 02 10.vi ‏9 KB

  • Can I show many values into Radar Chart?

    I I have this chart
    !http://img59.imageshack.us/img59/1282/radar2.png!
    I like to show diferentes values for all rows.
    This next image it´s create with MsPaint :p
    !http://img24.imageshack.us/img24/7899/radarm.png!
    i don´t want (<MarkerText visible="true" markerTextPlace="MTP_CENTER"/> ).
    I want to same this second image, it is posible, what is the parameter?
    thanks

    Hi Benito
    sadly that is not supported.
    Tim

  • Why I can not show a Movie from my PC (VAIO Windows Vista 64Bits) to the Apple TV....I am able to see the PC from the Apple TV, but when I click on Show Library, it says " Changing Library from PC Victor Medellin"...but never show it...

    When I go to AppleTV, I select the PC and click on it...It start to open the Library, sending a messege "Charging Library from Victor Medellin"  (the name of my PC) but never show it.   It send a messege " Check the Apple TV is on the same net and iTunes is turned on on PC..:"   but everything its ok.. I have tried with my wife´s PC and there is no Problem...
    If I click play in a Movie and try to select the Output APPLE TV, it still thinking and never send neither the Image nor sound....What i have to check???

    Hi adtsalmon,
    You can only watch the movie on the device you rented it on. Here's a snippet from the Apple Support site (italics mine):
    If you download a rented movie on your computer: You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it’s a standard-definition film (movies in HD can only be watched on your computer, iPad, iPhone 4 or later, iPod touch (4th generation or later), or Apple TV). Once you move the movie from your computer to a device, the movie will disappear from your computer's iTunes library. You can move the movie between devices as many times as you wish during the rental period, but the movie can only exist on one device at a time.
    If you download a rented movie on your iPhone 4 or later, iPad, iPod touch (4th generation or later), or Apple TV: It is not transferable to any other device or computer.
    Here's the link to the Movie Rentals FAQs site FYI:
    http://support.apple.com/kb/HT1657
    Hope this helps!
    Cheers,
    GB

  • About Olympus EP-1: ¿ Why Lightroom can't show difference between 2 RAW photos with different ISO?

    When I take RAW+JPG photos with my new Olympus PEN EP-1 which the unique difference is ISO and I import in Ligtroom:
    - I can see difference between JPG photos.
    - I can´t see any difference between RAW photos (In Olympus Master or Olympus Studio I can see difference). The problem is Ligtroom

    There are two sides to your question. I. should Lightroom read all embedded
    tags to a RAW file, and II. can it even technically do it.
    The problem is that all of tags such as this exposure compensation one,
    sharpening, picture styles, etc. are embedded in proprietary file formats
    that the manufacturers will not disclose the structure off. Adobe (and every
    other RAW converter out there that is not made by the camera manufacturer)
    has to hack into the file format to figure it out, so question II can be
    answered by "probably not" This is not Adobe's fault, but that of the camera
    manufacturers not using a standard RAW format. Interestingly, for camera
    manufacturers that use a standard format such as DNG (think LEICA for
    example), a lot of camera settings actually translate into Lightroom
    settings.
    For question I, you have to figure out where you draw the line. Which
    settings, on top of simply white balance (which Lightroom reads of course)
    should the program read and use? Myself I think the program should display
    the RAW data as accurately as possible. In the case of the "ISO bracketing"
    that is not really ISO bracketing, the RAW data did not change at all. The
    program should reflect this, if only to make the user realize that it is a
    useless experiment and only a waste of card space. That said, it would be
    nice if some settings translate, but that is made really hard due to the
    proprietary file format.
    >Would I expect Adobe implements how Olympus E-P1 works in next versions ?
    I doubt it, but maybe somebody at Adobe is adventurous enough to reverse
    engineer/hack your files to figure out where the compensation tag is stored,
    so you never know.
    This is however a very uncommon situation to encounter. Why would anyone
    bother ISO bracketing if the camera doesn't ISO bracket at all! You're
    better off just dialing in extra or less exposure in post. For me the
    advantages of LR over typically glacial and badly written manufacturer
    software is so large that small issues such as this do not begin to add up
    to an argument to change workflow. In the end that's all personal of
    course.

  • Why Siri can't show me the weather information?

    Hello guys, I am a iPhone 4s user in Hong Kong.
    Siri is a very good assistant and I love "her" very much.
    But since yesterday, I can't get weather information from Siri.
    "She" said something is wrong and told me to try again. But it's still
    not working now.
    Can someone please tell me what's wrong?
    Thanks you so much.

    Siri is still in beta testing and intermitanly loses connection with its server and weather servers.

  • Who I can read the right value of '�' character ? Thanks!

    Hi, I created a text file using plain editor ( notepad), when I try to read the character '�' a got the � symbol.
    What I have to do ?
    Thanks in advance.

    There is no � in ASCII.
    If you are putting it in java source code, you will
    have to substitute with a /u00F1Sorry, make that a \u00F1

Maybe you are looking for

  • How do you change name of the files before sending files to FTP site?

    Hi guys, my environment is SQL Server 2008 R2. Currently, I'm trying to figure out how to tackle the following project: I have over 100 files that I need to send via FTP on daily basis. Before doing so, I must change the extension of the file to a sp

  • How to Clone Service Ticket in BSP

    Hi, all my friends: I want to add one button called 'CLONE' in the view SrvTHead. when user click on it. copy the current Service Ticket (Case#) to create new Serivce Ticket. How to copy all BOL objects from original to new Service Ticket. Thanks, Zh

  • Not able to start SDM

    Hi All,   I do have a local installation of SAP J2EE engine in my machine. But if I start the instance, SDM is not getting started. Here is the log entry,   ============================================ Feb 4, 2006 4:17:02 PM   Info: =   Starting to e

  • Return Delivery of Intercompany Transfer Order

    Dear guru , I want to know all the transactions for the logistic and accounting process of Return of Intercompany transfer order. Thanks.

  • How to find "menge" in "me21n" after change?

    How to find "menge" in "me21n" after change? The user create new order in me21n, He insert new quantity ( for example 105 )  , And after it ( he change to ) 106  , i want to see those 106 parts in user exit  MM06E005  (exit 6 , 7 , 8 ) But i see the