|
-
Sep 27th, 2002, 01:29 PM
#1
Thread Starter
Frenzied Member
Javascript alert() function
can you use a Javascript alert() function when using a web form control?
-
Sep 27th, 2002, 04:58 PM
#2
Fanatic Member
Re: Javascript alert() function
Originally posted by EyeTalion
can you use a Javascript alert() function when using a web form control?
<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='javascript:alert("test");'>HyperLink</asp:HyperLink>
John
-
Sep 27th, 2002, 05:54 PM
#3
Lively Member
Hold up!
That would work fine - just make sure that you type "javascript:", and not "java script" - the space would not be valid, I think.
Last edited by trojjer; Sep 27th, 2002 at 05:58 PM.
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
-
Sep 27th, 2002, 05:59 PM
#4
Lively Member
Huh?!
Why is "javascript" appearing with an extra space, in that post? I've edited it again, but it still sticks to "java script", even when there's absolutely no space in between...
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
-
Sep 28th, 2002, 10:47 AM
#5
The forum software does that so that people cant try to stick malicious javascript into forum posts.
-
Sep 28th, 2002, 07:50 PM
#6
Lively Member
Oh I see...
I think I know what you mean now - like a sneaky javascript URL or something?
P.S: Ah - so it only insterts the space if the "javascript" is in quotes... got it.
P.P.S: I wonder if single quotes catch it out or not... testing: 'javascript'...
P.P.P.S: No - that doesn't get filtered through - very weird... must only happen occasionally; ie it's not 100% js exploit-proof?
Last edited by trojjer; Sep 28th, 2002 at 07:55 PM.
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
-
Sep 30th, 2002, 07:09 AM
#7
Thread Starter
Frenzied Member
thanks guys...one more question. How do you create a msgbox in ASP.NET if you are coding in the VB code behind page? I'm doing some validations on a click event...
-
Sep 30th, 2002, 09:31 AM
#8
Lively Member
Client permissions only...
Erm - the MsgBox function can only execute on the clientside, obviously... I don't know about ASP.NET tags, but I usually just Response.Write the client VBS code, after processing it on the serverside.
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|