• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1083
  • Last Modified:

window location coldfusion passing

I am getting an error that says, expected ) when I try this, why?

opener.location.href('calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#'); window.close();
0
judsonmusic
Asked:
judsonmusic
  • 5
  • 4
1 Solution
 
B_DorseyCommented:
you are opening a window and closing the window that opened the window?
0
 
_agx_Commented:
To set the location use = not parenthesis (...)


<cfoutput>
...
opener.location.href='calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#';window.close();
</cfoutput>
0
 
judsonmusicAuthor Commented:
I actualy had to do this:

opener.location.href=('calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#');window.close();
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
judsonmusicAuthor Commented:
well actually, thats not working either.

this is what I put:
  <script>
  window.opener.location.href='calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#';
  window.close();
  </script>

it is now saying, expected ;
0
 
judsonmusicAuthor Commented:
what I am doing, is at the end of and update statement, I want to colse the currentpopup and go back to the url in the opener window. i was using refresh, but it gives that retry error.
0
 
_agx_Commented:
> this is what I put:

You need to surround it with <cfoutput> tags

<script type="text/javascript">
      <cfoutput>
      opener.location.href='calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#';
      window.close();
      </cfoutput>
</script>

> i was using refresh, but it gives that retry error.

What syntax were you using..  reload()?
0
 
judsonmusicAuthor Commented:
yes, reload, is there a better way?
0
 
_agx_Commented:
Reload is fine.  But I don't know what "that retry error" is.  That's why I wanted to see the syntax you used.
0
 
judsonmusicAuthor Commented:
oh it is just IE7 warning about page reload, thats all
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now