Call asp.net subroutine from javascript

  • Thread starter Thread starter Christophe
  • Start date Start date
C

Christophe

Hi,

I'm trying to call an asp.net subroutine from a javascript function.
Does anyone have got the solution and an example?
Thanks in advance!
 
Christophe said:
Hi,

I'm trying to call an asp.net subroutine from a javascript function.
Does anyone have got the solution and an example?
Thanks in advance!

Javascript is running on the client pc and the asp routine on the server. So
you need to give your vars 'Thru".
I do not know a answer, but have a trick, that calls a aspx page secretly,
even from a HTML tag.
It was used as an secret ip logger in html based forum.

This tag

<img src=http://www.mysecrescript.com/default.aspx?myvar=testing width=0
height=0 border=no>

lets the script on default.aspx run, without showing it !

Backwords. e.g. giving vars thru from asp to a javascript is possible, bij
writing the script by asp.
It looks like this: (a java popup alert window, filled with an aspx var)

dim mytext as string = "This is my text"

response.write("<script langauge=javascript>")
response.write("window.alert('"& MyText &"');")
response.write("</sc" & "ript>")

(make sure </script> is broken)

Imre
 
Back
Top