[Zope] javascript redirects in zope

Karen Yang chefky77@yahoo.com
Sun, 13 Oct 2002 07:32:28 -0700 (PDT)


--0-656551535-1034519548=:54358
Content-Type: text/plain; charset=us-ascii


I am trying to do a redirect in javascript by setting the location object to a passed in URL. It doesn't seem to work in Zope and has always worked in JSP or any other HTML file. Is there any zope restriction prohibiting this code to work? Any suggestions for a workaround?

My function: (shows the confirm window, but then does not redirect after I answer 'Yes')
  function confirmDelete(code, url) {
   var resp = window.confirm("Delete item " + code + "?");
   if (resp) {
           location.href=unescape(url);

           /** also tried location=unescape(url); and document.location=unescape(url)

                but didn't work **/
    }
  }
  

Thank you.

Karen



---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
--0-656551535-1034519548=:54358
Content-Type: text/html; charset=us-ascii

<P>I am trying to do a redirect in javascript by setting the location object to a passed in URL. It doesn't seem to work in&nbsp;Zope and has always worked in JSP or any other HTML file. Is there any zope restriction prohibiting this code to work? Any suggestions for a workaround?</P>
<P>My&nbsp;function: (shows the confirm window, but then does not redirect after I&nbsp;answer 'Yes')<BR><FONT color=#0000bf>&nbsp; function confirmDelete(code, url) {<BR>&nbsp; &nbsp;var resp = window.confirm("Delete item " + code + "?");<BR>&nbsp; &nbsp;if (resp) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>location.href=unescape(url);</FONT></FONT></P>
<P><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** also tried location=unescape(url); and&nbsp;document.location=unescape(url)</FONT></P>
<P><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; but didn't work **/</FONT><FONT color=#0000bf><FONT color=#ff0000><BR>&nbsp;&nbsp;&nbsp; </FONT>}<BR>&nbsp; }<BR>&nbsp; </FONT></P>
<P><FONT color=#000000>Thank you.</FONT></P>
<P>Karen</P><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://faith.yahoo.com">Faith Hill</a> - Exclusive Performances, Videos, & more<br>
<a href="http://faith.yahoo.com">faith.yahoo.com</a>
--0-656551535-1034519548=:54358--