Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts link

 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,


i have an issue in struts link.
my jsp page holds a form and it use the form variables in it.

one of that variable like



it is fetched and shown correclty in jsp.

now i have to make a link which open this form variable in a pop-up.
i made that link as


is there any way to pass serverurl variable in to this openUrl() method?
i know it is possible by setting it as a request attibute... but i hope there exists some better way to do it.....

thanks in advance for any help.....
 
pooja par
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the openUrl() function is in the same jsp

if you want to pass the value to the popup window
 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks pooja..
but its not working in my page
 
Arjun Murthy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this

<html:text property="serverurl" size="40" id="serverurlid" />

function openUrl(){
var x = document.fgetElementById("serverurlid").value;
}
 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks pooja and arjun

pooja i tested your code in mozilla and it not getting the value.
but after it changed as

var x = document.forms[0].serverurl.value; it works, any way your code is ok in explorer and chrome. thanks

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic