how to redirect the windchill page to product folder page after submit button is clicked?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
how to redirect the windchill page to product folder page after submit button is clicked?
Hello Everyone,
I am new to windchill customization. I am to write a custom page, in which i am show some questions and text area for answers, and a submit button. I am to take those question and answers and pass to server when user clicks submit button and page should get redirected to Product folder page.
Till now i am able to create custom JSP page using HTML and JavaScript. i have made submit button using action tag in JSP. Can somebody guide me how i can achieve this or better way to achieve this. please refer the attachment.
- Labels:
-
JavaScript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Gajendra Rainger,
I tried this in very limited use case and found that you can do something like this.
- First get/retrieve Product OID programatically.
- Once you have OID, you can then generate static URL something like below:
- http://<Windchill_Host>/Windchill/app/#ptc1/tcomp/infoPage?oid=OR%3Awt.pdmlink.PDMLinkProduct%3A218107&u8=1
- Note the URL pattern. Only OID is changed for every product. Rest is same.
- One you have this URL, you can then pass it to window.location attribute as below:
<html>
<body>
<form action="" method="POST" >
How many times a day you use this product? <textarea rows="2" cols="50" name="first_name"></textarea>
<br /><br />
How long you have been using this product for? <textarea rows="2" cols="50" name="last_name"> </textarea>
<br /><br />
Any Suggestions? <textarea rows="2" cols="50" name="last_name"></textarea>
<br /><br />
<input type="button" value="Go Here" onClick="window.location = 'http://<Windchill_host>/Windchill/app/#ptc1/tcomp/infoPage?oid=OR%3Awt.pdmlink.PDMLinkProduct%3A218107&u8=1';">
</form>
</body>
</html>
Watch this short video:
I hope this helps:
Regards,
Shirish
