You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by TKV Tyler VanGorder <TK...@landacorp.com> on 2001/06/12 02:13:05 UTC

Javascript implementation of ?

I ran into an interesting problem:

I need the ability to rewrite the url, with the encoded session information,
dynamically, after the page has already been loaded by the browser client.

I am opening a new browser window for doing searches, some of the fields on
my first page need to be passed along to this secondary page.

If I didn't need to pass parameters from my form onto the new window I could
just use the rewrite tag.

Like this:

window.open ('<html:rewrite
  page="/findRequestedFacility.do"/>',
  'provider', 'scrollbars=yes,width=640,height=480,status=yes');


====================================================================
However, my url needs to look something like this:

//Grab a parameter off my form...
var lUrl = "/findRequestedFacility.do?FacilityId='" +
		form.facilityId.value + "'";

//Rewrite the URL...Need Javascript function to do this.
lUrl = rewriteUrl(lUrl);


//Open the thing.
window.open (lUrl, 'provider',
  'scrollbars=yes,width=640,height=480,status=yes');

Has anybody written a javascript function to do this?

Thanks

Tyler Van Gorder
tkv@landacorp.com
Landacorp