Hidden Field Value

I want to import a value from a visible field to a hidden
field. The data will be sent to a mySQL DB via php. I've tried
changing the php script to obtain the results I want
unsuccessfully. A hidden field should also do the trick but I'm not
sure how to accomplish the task. A google search turned up some
javascript which I've been working with today, but still haven't
gotten to work correctly.
Basically, the form has a text field called duration. I want
the user inputed value of the duration field to be copied to a
hidden field called xc. Thanks for any input or ideas?

BTW, using the following onSubmit and script works correctly
as the database receives the information, but a pop-up is triggered
when the Submit button is pressed. Any ideas why this is?
If I can rid the pop-up, the js will work great.
function CopyValue(obj1, obj2)
var visibleField = obj1;
obj2.value = visibleField.value;
alert(obj2.value);
onSubmit=CopyValue(duration, xc)

Similar Messages

  • Hidden field value init. by a var in Netscape && MSIE ...

              Hi there,
              I have a hidden field specified this way :
              <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              Suppose that myValue is 'Ionut RUSUBOCA'
              If I run this with Netscape 4.75 it works just fine.
              If I run this with Microsoft IE 5.50.4522.1800 I get an error that points to the
              way the hidden field value is specified.
              If I change ...... value = "<%=myValue%>" ..... to .... value = <%=myValue%>
              ... ( that is, if I remove the double quotes ) then MSIE is Ok but ... instead
              of 'Ionut RUSUBOCA' I only get 'Ionut'.
              Could you, please, help me make MSIE see the correct value that is 'Ionut RUSUBOCA'
              ? ( like Netscape )
              Which browser are not W3C compliant in this matter ?
              Thank you,
              rivisa
              

              Thanks for the reply.
              Well, I quoted everything and still does not work with MSIE.
              Indeed, when I quote value="<%=myValue%>", I get in MSIE value = "Ionut RUSUBOCA"
              but it does not make any difference : it breaks.
              If I take out the quotes ( value = <%=myValue%> ) then the source is viewed as
              value = Ionut RUSUBOCA and when the form
              gets submitted I only get 'Ionut' as value.
              This is weird, so to speak.
              Can you reproduce this thing in your system ?
              Thanks,
              rivisa
              "Cameron Purdy" <[email protected]> wrote:
              >> <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              >
              >All attributes should be quoted.
              >
              ><input type="hidden" name="<%=myName%>" value="<%=myValue%>">
              >
              >Look at the result by choosing "View Source" from the MSIE context menu.
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"_rivisa_" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >>
              >> Hi there,
              >>
              >> I have a hidden field specified this way :
              >>
              >> <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              >>
              >> Suppose that myValue is 'Ionut RUSUBOCA'
              >>
              >> If I run this with Netscape 4.75 it works just fine.
              >>
              >> If I run this with Microsoft IE 5.50.4522.1800 I get an error that
              >points
              >to the
              >> way the hidden field value is specified.
              >>
              >> If I change ...... value = "<%=myValue%>" ..... to .... value =
              ><%=myValue%>
              >> ... ( that is, if I remove the double quotes ) then MSIE is Ok but
              >...
              >instead
              >> of 'Ionut RUSUBOCA' I only get 'Ionut'.
              >>
              >> Could you, please, help me make MSIE see the correct value that is
              >'Ionut
              >RUSUBOCA'
              >> ? ( like Netscape )
              >>
              >> Which browser are not W3C compliant in this matter ?
              >>
              >> Thank you,
              >> rivisa
              >>
              >>
              >
              >
              

  • How to get-set Hidden field value from JSP ?

    Hii,
    I am quite newbie about jsp and looking for some help..
    I have several url links on my jsp page.
    I when I click one of them, I want to reload my page with new request parameter(s) but also keep the older one(s) in hidden field(s)...
    but I dont know how to set and get hidden field value "syntax" and I am not sure about where/when should I do this... at first I though that I can do it in "onClick" property of url..
    Thanks..

    Hy,
    I have a problem just like that. I am trying to send the value of an subdomain is to another page to be able to modify an entry.
    So in listsubdomains.jsp I have
    <input type = "hidden" name = "subdomainid" value="<%=subdomains.SubdomainID%>"><%=subdomains[i].SubdomainID%>.
    This shouls send the id of the subdomain.
    I an sending this to modifysubdomain.jsp with <form name = "listsubdomains" method = "post" action = "modifysubdomain.jsp">
    and there I retrieve the value like this:
    Integer id = new Integer (request.getParameter("subdomainid"));
              out.println(request.getParameter("subdomainid"));
    My problem is that no matter what is the value I chose to modify it always sends the first value. If I another value manually it works, but just then.
    Please give me some ideas.

  • Not able to retrieve netui hidden field values in java script

    I have problem in retrieving hidden field values in javascript
    I have declared hidden field as below,
    <netui:hidden dataSource="actionForm.selectedColumns" tagId="hiddenSelectedfield"></netui:hidden>
    and retrieving with tagId in javascript as below,
    obj1 = document.getElementById(tagId).style;
    its not getting value with tagId defined in netui tag.
    Any suggestion...
    Thanks,
    Amit

    Hi,
    I'm a new bee to this adobe forms and VBS.Could you explain more on that Fdf file or Can you send some documentation where i can go through of.
    Even i'm very much happy to share the pdf file..the problem is it is binded with the SAP browser.So i cant make a copy to my local system,But i can explain all the technical stuffs inside the form.
    The form is developed using adobe lifecycle designer,i can see the fields are defined in the design view.
    The fields which i'm accessing to enter the values are visible & Set user defined values..
    when you access through the SAP portal,it opens up inside the browser ..so every field you choose or select additional fields get added based on the selection..
    The "GetField" code you have shared works perfectly fine..i could read all data,or i could select a particular field to retrieve the field.
    But the "SetField" code you have shared locating the field but it is not writing the value into the field.I called a setfocus method on the particular field as well..then put f.value = fieldvalue still it chooses the particular field but didnt feed the value...
    is it possible to call a keystroke to the particular field?
    if you have any ideas please throw it up on me..i'll try all my possibilities.
    Thanks for your time !

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

  • Access HTML hidden field value in JSP

    Hi,
    I have a JSP and need to access the hidden fields on that HTML page,
    i.e. in HTML i have a hidden tag
    <form name="login">
    <input type="hidden" name="language" value="en">
    </form>
    in my jsp i want to read the value of hidden field language
    how can i do it???

    You read it as any other field :
    String lng=request.getParameter("language");
    The string lng will contain the value "en"
    regards

  • Can't set a hidden field value from onClick event with a runtime expression

    Hi,
    I need to set a hidden field in an onClick event of button but it's not working.
    <html:submit styleClass="btnLink" onclick="document.empForm.hidden.value='<%= empID%>'">
    <%= empID%>
    </html:submit>
    Althought the second expression is evaluated and written successfully "the button value"
    I heard that this is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions.
    Is there any work around to solve that?
    I can't use EL as I'm using old JSP version

    I guess, it should work; instead of html:submit, try with button.

  • How to set hidden field value in form?

    I've encountered a problem while developing a forum using JSF. See this code:
    <h:form id="commmentForm" formName="commentForm" >
         <h:input_hidden id="pageId" valueRef="CommentBean.pageId" value="${article.id}"/>
         <h:input_text id="userName" valueRef="CommentBean.userName"/>
         <h:input_text id="userEmail" valueRef="CommentBean.userEmail"/>
         <h:input_text id="userURL" valueRef="CommentBean.userURL"/>
         <h:input_textarea id="content" valueRef="CommentBean.content"/>
         <h:command_button id="submit" label="Leave A Comment" commandName="submit" actionRef="CommentBean.createAction" />
    </h:form>
    I was trying to specify a hidden field that represents the unique ID number of the current article using <h:input_hidden> tag above. But RI complains that runtime expression is not permitted in 'value' attribute. So I set the attribute 'value' to arbitrary number such as '2', but it seems that CommentBean.pageId is still null.
    So the question is:
    1. Why can't I use EL in JSF tags attributes?
    2. How can I resolve my problem mentioned above?
    Thanks very much in advance!

    To solve the problem, you have to use two hiddenfields, say:
    <h:input_hidden id="pageId"valueRef="CommentBean.pageId" />
    <h:input_hidden id="articleId" valueRef="article.id"/>
    I want to set the value of CommentBean.pageId to
    ${article.id} (article is not a managed bean) and to
    let CommentBean.createAction insert a database row
    whose page_id column is ${article.id}, so I think the
    tags you suggested won't work for me.Why can't you interrogate your ComponentBean for its pageId property during your invoke() method? By the time your invoke() method is called, the value from the hidden field will have been pushed to the model, so this should be no problem. You could do Application.getValueBinding("ComponentBean.pageId").getValue() to do so.
    Ed

  • ISA Shop hidden field value lost

    Hi,
    I have a problem with the Internetshop. I need to change a value in a field like
    <input type="hidden" name="savefield" value="">.
    I change the value withe a onclick javascript event. I use a alert message to show me that the value changed.
    The function of this value is to differ between the normal shop basket and my arranged basket.
    There will be an if-term which will use this value and change the basket.
    But every time i look into the hidden field its null.
    Has anyone an idea whats the problem is?
    Thx Johannes

    Hi Johannes,
    I found it difficult to approach a lot of my developments in the webshop as the development guide isn't very specific in it's examples.
    I'm interested that you reference the version 3.00 guide - the last I found was version 1.  Where did you get this document and/or are we talking about different documents?!
    Thanks,
    Gareth.

  • Adding a check box to my page clears the value in a hidden field on page 0

    Hello, I hope that someone can assist me. I have a page that has multiple submit buttons on it. When I click a submit button the page refreshes to render the new content. I have a hidden field, and its region is set to one on page 0. Without any check boxes on my page, I can set a value in the hidden field, and it remains there even if I click on any submit buttons. If I put a check box on the page and then press a submit button, the value is cleared in the hidden element which is not desired. I did notice that in this case with the check box, if I refresh the browser the hidden field value is not cleared. Perhaps the page is being rendered differently after the submit because of the checkbox. Does anyone have any ideas of what is happening?

    That doesn't sound right. Adding a checkbox shouldn't have that effect. Please try to reproduce this on htmldb.oracle.com so we can take a look or post a screenshot of your relevant page components.

  • Hidden field in form returns null value

    Hi all - I searched for this but found nothing that fit my problem although various other problems came up.
    I have a Login jsp, with a simple form for username and password:
    <form name="login" method="post" action="servlet/ControlServlet"
    onSubmit="return validateForm()"><table width="180" border="0"
    cellspacing="0" cellpadding="0">
                <tr>
                  <td width="96" class="logintext">Username</td>
                  <td width="84"> </td>
                </tr>
                <tr>
                  <td><input name="username" type="text" size="15"
    maxlength="15"></td>
                  <td><input type="submit" name="Submit" value="Login"></td>
                </tr>
                <tr>
                  <td class="logintext">Password</td>
                  <td> </td>
                </tr>
                <tr>
                  <td class="logintext"><input name="password" type="password"
    size="15" maxlength="15"></td>
                  <td><input name="actionCode" type="hidden" value="0"></td>
                </tr>
                <tr>
                  <td> </td>
                  <td><div align="center"><a href
    ="Register.jsp"><i>Register</i></a></div></td>
                </tr>
              </table>
              </form>Nothing complex in that form. my hidden field is actionCode and it should pass a 0 to my ControlServlet servlet.
    Here is a snippet from my servlet:
    import java.io.* ;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ControlServlet extends HttpServlet {
      public void doPost(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
                //get the printwriter to output for debugging
                PrintWriter out = response.getWriter();
                //read in form variables
            //String formUsername = request.getParameter("username");
            //String formPassword = request.getParameter("password");
            String action = request.getParameter("actionCode");
            //convert String to int for action
            //int actionInt = Integer.parseInt(action);
            //add action variable to request
            request.setAttribute("aktion", action);
                //debug point 1
                //use requestDispatcher to forward session info to JSP
               RequestDispatcher dispatcher =
               request.getRequestDispatcher("/mvcoutput.jsp");
               dispatcher.forward(request, response);I have commented out a bit for debugging purposes, but basically, the form variables are read in, the username and password don't give me any problems, but the actionCode does. Upon forwarding to a basic jsp for testing my output displays value "null" when using the command:
    request.getAttribute("aktion")Any reason why the hidden field is playing silly buggers ??
    cheers

    Anyone ???
    If I have a field in an html form which is hidden, do I retrieve it in the SAME WAY that I retrieve the non hidden form fields i.e. using the request.getParameter() method ??
    Cheers.

  • Setting the value of a hidden field in a Visual Web jsf page

    Hey All,
    I am new to jsf and need some help with the following. I have written a method in the java portion of the jsf page that will get the selection(s) from a listbox and return them as a string. I need to assign the value of that string to a hidden field in the jsp portion of the page, so that I can pass the string as a parameter to a servlet. I have tried the following code in the "button_action", in the java portion of the jsf page, to assign the value of the string, returned from method, to the hidden field:
    hiddenField.setValue(string);
    This is not working. Any and all help on this matter is greatly appreciated.
    Thanks in advance.

    Here is the tag for the hidden field when the "hidden field" component is added from the pallette, I addded the "value" and "id". The name of the class is ReportStandard, which extends the AbstractPageBean.
    <webuijsf:hiddenField binding="#{ReportStandard.utilSelHF}" id="utilSelHF" value="#{ReportStandard.utilParams}"/>This is how I am calling the hidden field in the servlet:
    utils = request.getParameter("form1:utilSelHF_field");Here is the code for the button_action:
    public String runReport_button_action() {
           this.utilParams = get_utilSelection();
           return "sRptrslts";
    }

  • Why my JSP page can't get the value of a hidden field

    Hi, I got an interesting question here.
    I use req.getParameter() method to get a hidden field in Servlet, it works just fine.
    However, when I use the JSP to catch the value of that hidden field, JSP just can't, but if I change the type from hidden to text, it works fine again.
    the code is as follows:
    there are two jsp pages:game.jsp and GameMonitor.jsp.
    In game page:
    ============================================================
    <FORM action=GameMonitor.jsp method=post
    webbot-action="--WEBBOT-SELF--">Display the names of all the players currently
    connected to the server       <INPUT tabIndex=1 type=submit value=Lookup name=B1>
    <INPUT TYPE=hidden,value=1 name=p1>
    <P></P></FORM>
    ===========================================================
    I want GameMonitor.jsp to catch the value of hidden field "p1" by calling request.getParameter()
    the code catching it in the GameMonitor.jsp is:
    ============================================================
    String option = request.getParameter("p1");
              out.println("option=["+option+"]");
              try{
                   if(option.equals("1")){
    ===========================================================
    supurisingly, the result is option=[], which means it didn't catch the value of the p1 submitted by POST method.
    Does anybody here can tell what's wrong in the code?

    Thank you so much, I also found this error, which makes JSP not able to catch the hidden field, however, if I change it to text type, even the comma exists, it still works. pretty interesting!
    >
    <INPUT TYPE=hidden,value=1 name=p1>Modify the above lline and write like this....
    <INPUT TYPE="hidden" name="p1" value="1">
    And ensure that you're submitting the form data.
    Though nothing much has been changed, just try whether
    these help!!!
    fun_one

  • Change hidden form field value

    hi everyone...i'm hoping someone can help me figure out how
    to change the value of a hidden field in a form. i have a page
    setup where users pay a website fee. since the fee is always the
    same, i have the amount setup in a hidden field in my form. my
    question is, i'd like to use promo codes. so i'll add a box in my
    form that says "enter promo code." then there's a link in the form
    that says "apply promo code." i'm thinking that link needs to
    refresh my page and take the value entered by the user in the promo
    code form field and place it in the url. that way i can write a
    cfif statement to change the value of the hidden field. the problem
    is, i can't figure out how to "refresh" the page and take the value
    out of the form field and place it in the url. hope this makes
    sense. maybe someone can offer a better way to do this? i'd truly
    appreciate any help anyone can offer. thanks!

    You would change the amount on the processing page with
    ColdFusion (after the form is submitted), but prior to the CFHTTP
    call. You really should familiarize yourself with CFHTTP (check
    online documentation). It sounds like it is exactly what you need.
    The format of your application would be something like:
    promocode.cfm:
    ====================
    <form name="someform" method="post"
    action="process.cfm">
    <input type="text" name="name">
    <input type="text" name="address">
    <input type="text" name="promocode">
    <input type="hidden" name="order_price"
    value="#OrderValue#>
    </form>
    process.cfm
    ======================
    <!--- Apply promo code --->
    <cfif form.promocode eq "Promo1">
    <cfset form.order_price = .75 * form.order_price>
    </cfif>
    <cfset sales_tax = .1 * form.order_price>
    <!--- Send data to processor gateway --->
    <cfhttp url="https://www.myProcessor.com/gateway/"
    method="POST">
    <cfhttpparam type="FORMFIELD" name="price"
    value="#form.order_price#">
    <cfhttpparam type="FORMFIELD" name="tax"
    value="#sales_tax #">
    <cfhttpparam type="FORMFIELD" name="cc_number"
    value="#cc_num #">
    </cfhttp>
    <!--- Check response --->
    <cfif FindNoCase("Success Text", CFHTTP.fileContent)>
    Good Response
    <cfelse>
    Bad Response
    </cfif>

  • Safara 5.1.5 pass old value for a hidden field with new values

    Hi
    I have the JSP pages which used to be working in Safra 5.1.3. There is a hidden field: mac, submitted to and from this JSP page.
    Page A submits "mac" with value1, backend a java action received this value and change it to value2 after some calculation, value2 is set to page B. I can see the hidden field "mac" contains value2 in page B. But when I submit page B, the value being transmitted is still value1.
    I tested to change this field to a visible text field rather a hidden one. The value being passed will be the correct one: value2.
    Other browsers except Safari 5.1.5 do not have such strange behavior. 
    Is there any solution for this problem apart from changing my form filed names?
    Thanks.

    you can only list what was stored.
    changes in values for a characteristic can be monitored in CL20N via menu Environment > Change documents
    change history for classification is only stored if you activated this.
    maybe it is not set active in your system, then see SAP Note 943559 - FAQ: Frequently asked questions about the classifctn. system

Maybe you are looking for