• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

portlet submit using javascript

 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • 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.
 
Neeraj Shidhaye
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic