Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

portlet submit using javascript

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am having multiple buttons in a page. Using javascript onclick() event, I want call the portlets and the URL for that is retrived using createActionURL() and passed to the hiddent field of the XHTML.

Now, using(considered it as angular brackets)
document.forms[0].action = <URL>;
document.forms[0].mentod= "post";
document.forms[0].submit();


The processAction() is called. but the request object is not hold the entered values. I m not getting the entered values in the file.

Please help.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Abhijit,

why are you setting actionURL to hidden field?

<Neeraj Sidhaye/>
http://ExtremePortal.blogspot.com
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Neeraj ,
Actually I am using XHTML files only and java file for Portlet.
runtime I am setting the URL value generated in the the Java file using createActionURL() and set it by using java DOM object API in the XHTML file in a hidden field. Once click on the submit, in the javascript
document.myform.action= <the hidden field value- the URL >;
document.myforms.method="post";
document.myform.submit();


On the otherhand, if i set the URL in the
<form action="" >
and uses the submit button, it works fine.

thanks
 
Get me the mayor's office! I need to tell him about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic