Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Web Part/Form Post

  Asked By: Jackson    Date: Sep 23    Category: Sharepoint    Views: 1075

Does anyone know how to manipulate the action attribute of a form web part (I
know it's a DIV but I need to somehow change how the real form gets posted)? I
need to populate some values in various form fields and then post it to a
different page.

The Javascript in the web part would look something like this to do the form
post:

self.document.getElementById("Form1").elements["field1"].value = value1;

self.document.getElementById("Form1").elements["field2"].value = value2;

self.document.getElementById("Form1").setAttribute("action", sURL);

self.document.getElementById("Form1").setAttribute("target", sTarget);

self.document.getElementById("Form1").submit();

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Web Part/Form Post Or get search suggestion and latest updates.




Tagged: