• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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
 
Your mother is a hamster and your father smells of tiny ads!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic