page cannot be refreshed without resending the informayion

  • Thread starter Thread starter ABCL
  • Start date Start date
A

ABCL

Hi
I have aspx page that has a html link on it( <a
href="javascript:window.open('xxx.aspx')";..)
When I click this link If should open new window usng javascript, But
it gives me a message
"Page cannt be refreshed without resending the information.."

How to solve this prob?
Thanks in advance
 
ABCL said:
Hi
I have aspx page that has a html link on it( <a
href="javascript:window.open('xxx.aspx')";..)
When I click this link If should open new window usng javascript, But
it gives me a message
"Page cannt be refreshed without resending the information.."

How to solve this prob?
Thanks in advance

You are not only calling the window.open method, you are also navigating
to it's return value as the link is also activated. I don't know exactly
why, but this seems to cause a form to be posted.

This is how I would do it:

<a href="xxx.aspx" target="_blank" onclick="window.open(this.href,
this.target);return false;" />

This is backwards compatible. If Javascript is available, it will open
the window and prevent the link to be activated, if not, the link will
be activated instead. This way the content is always available even if
Javascript is disabled.
 
Back
Top