Jump to content

get current url strange problem


evonevo
 Share

Recommended Posts

Guys,I've a problem obtaining current url on Sharepoint 2007 site.This is how I get this to work: <script type="text/javascript" language="javascript">function open_win(){var pathname = window.location.pathname;window.open("http://mysite/sites/newspace/Lists/MyLinks/NewForm.aspx?Url=http://mysite" + pathname);}</script><input type="button" value="Open Window" onclick="open_win()" />(just want to pass full URL to the form under NewForm.aspx) I'm including script on below site: http://mysite/sites/...s/AllItems.aspxBut this is list site so when I'm filtering list the url becomes something like this: http://mysite/sites/...Value2=Area%202 Only then I'm clicking button and executing function.However the problem is that 'pathname' returns only '/sites/newspace/LibraryTest/Forms/AllItems.aspx' not including parameters values. Problem is that I need full url. Any ideas how to do this ? ThanksEvo

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...