*
The moose likes Struts and the fly likes struts link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts link" Watch "struts link" New topic
Author

struts link

Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
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

Joined: Feb 14, 2011
Posts: 31
if the openUrl() function is in the same jsp

if you want to pass the value to the popup window
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
thanks pooja..
but its not working in my page
Arjun Murthy
Greenhorn

Joined: May 11, 2011
Posts: 10
Try this

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

function openUrl(){
var x = document.fgetElementById("serverurlid").value;
}
Jomy George
Ranch Hand

Joined: Jan 13, 2011
Posts: 65
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts link
 
Similar Threads
Generating actions for submit buttons based on button
Struts 2 JSON validation not working in Firefox
Opening a web page with Java problems(BrowserLauncher problems)
checkboxes persistence
JS ---> JSP variables