Solved

window location coldfusion passing

Posted on 2007-11-26
10
1,008 Views
Last Modified: 2012-05-05
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
Comment
Question by:judsonmusic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 14

Expert Comment

by:B_Dorsey
ID: 20353643
you are opening a window and closing the window that opened the window?
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20353802
To set the location use = not parenthesis (...)


<cfoutput>
...
opener.location.href='calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#';window.close();
</cfoutput>
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 20357830
I actualy had to do this:

opener.location.href=('calendar.cfm?Qdate=#dateformat(form.appdate, 'mm/dd/yyyy')#');window.close();
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 20357885
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 20357897
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
 
LVL 3

Author Comment

by:judsonmusic
ID: 20357904
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
 
LVL 52

Expert Comment

by:_agx_
ID: 20357962
> 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
 
LVL 3

Author Comment

by:judsonmusic
ID: 20358471
yes, reload, is there a better way?
0
 
LVL 52

Expert Comment

by:_agx_
ID: 20358578
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
 
LVL 3

Author Comment

by:judsonmusic
ID: 20358593
oh it is just IE7 warning about page reload, thats all
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question