Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Goto Detail Page to PopUp Window

New Here ,
May 25, 2010 May 25, 2010

I have a page with a repeat region in ASP VBScript. I want to use a Goto Detail Page but to open a PopUp Window with Javascript. This doesn't work for me, as it always goes to the first record:

<script>
function opencalinterval(){
var popurl="/en/calcenter/equipment/edit_calinterval.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & rsAssets.Fields.Item("id").Value %>"
winpops=window.open(popurl,"","width=600,height=500,scrollbars,")
}
</script>

It works if I use it on a regular hyperlink like this:

<a href="/en/calcenter/equipment/edit_calinterval.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & rsAssets.Fields.Item("id").Value %>">change</a>

TOPICS
Server side applications
403
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 25, 2010 May 25, 2010

I think that because you are withing javascript tags, it is not parsing the asp tags. You need to concatenate the string literals with the dynamic asp tags.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2010 May 26, 2010

I'm not sure to understand...can you give me an example or give me a link?

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 26, 2010 May 26, 2010
LATEST

>I'm not sure to understand

Javascript will interpret everything between the quotes are string literals, so the server side code will not execute. Try:

var popurl="/en/calcenter/equipment/edit_calinterval.asp?" + <%=  Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) &  "id=" & rsAssets.Fields.Item("id").Value %>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines