• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in setting the value in JSP  RSS feed

Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
Problem seems to be trivial but I still am not able to figure out the cause for it

I have the following snippet of code from where I sent the quoteId and actionItem from select drop down list's onchange event to javascript function

<select name="actionItem" style="width:120px" onchange="submitForm(<%=bean.getQuoteId()%>,this.options[this.selectedIndex].value)">
<option value="" ><%=QGConstants.QG_STRING_SELECT_VALUE%></option>
<option value="<%=QGConstants.RETRIEVE_QUOTE_VIEW_ACTION%>">View</option>
<option value="<%=QGConstants.RETRIEVE_QUOTE_DELETE_ACTION%>">Delete</option>
<option value="<%=QGConstants.RETRIEVE_QUOTE_UNARCHIVE_ACTION%>">Un-archive</option>

My javascript function submitForm has the following snippet
function submitForm(quoteNumber,actionValue){
document.forms["RETRIEVE_QUOTE"].search.value = 'archivedQuoteSearch';
document.forms["RETRIEVE_QUOTE"].action = "RETRIEVE_QUOTES?searchTab=1"

I get the value as passed from JSP as it is in this function but
still value is not set into the hidden variables quoteId and actionItem
and my subsequent alert prints blank.
Am I doing something wrong here?
Thanks in advance
Author and ninkuma
Posts: 66424
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use UBB code tags when posting code in order to preserve its formatting, and please take the time to post question in the appropriate forum.

Moved to the HTML/Javascript forum.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!