View previous topic :: View next topic |
Author |
Message |
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Sun Nov 19, 2006 7:53 pm Post subject: a lack of understanding |
|
|
I've been writing (failing to write) a script that is hopefully going to end up being an incredibly simplified version of the flooble chatterbox ([url]flooble.chatterbox.com[/url]) (I'm writing it because I hate the ads)
I've been having a problem lately with the button that submits a comment with the alias and comment. The error highlights:
<asp:Button runat="server" class="submit" OnClick="submit_chat" Text="chat"/>
specifically the 'onclick="submit_chat"' part, and says:
BC30456: 'submit_chat' is not a member of 'ASP.chat_chat_aspx'.
(chat.aspx is the name of the file involved)
I have sub submit_chat in the same file in script tags and everything. What does the compiler mean? _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Sun Nov 19, 2006 8:33 pm Post subject: |
|
|
OnClick is a JavaScript function and has nothing to do with ASP.NET as far as I know. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Mon Nov 20, 2006 5:17 am Post subject: |
|
|
It works in all my other scripts (which are either vb or c#).... _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Nov 20, 2006 1:52 pm Post subject: Re: a lack of understanding |
|
|
Flux,
This means that the function is declared as being not related to your button class. Posting the whole source code (without the actual code of each , just { ... } but with all the declarations and function/class prototypes) would help us suggest a solution. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Mon Nov 20, 2006 5:45 pm Post subject: |
|
|
Oops. How'd that happen? See the next post.. _________________ My signature is so lame.
I think phpBB forums hates my laptop '.';
Last edited by Flux on Mon Nov 20, 2006 5:51 pm; edited 1 time in total |
|
Back to top |
|
|
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Mon Nov 20, 2006 5:49 pm Post subject: |
|
|
Hehe...eh.. :oops:
About that. Here's the code thus far, and so far I was busy working on getting the button to work so I didn't pay much attention to the sub, yet.
Although, as you can see, I need help on that too, so that would be appreciated.
Code: |
Public Sub submit_chat()
public x as file "chat.txt"
if chatid.text = "" and chatmsg.text = ""
msgbox("You didn't enter anything...")
elseif chatid.text = ""
msgbox("You can't submit a message without a name.")
elseif chatmsg.text = ""
msgbox("Are you going to say something?")
else
x.writeline("<b>" & chatid.text & ":</b> " & chatmsg.text)
end if
end Sub
<!--#include file="/chat/chat.txt"-->
<br />
<p>Alias:<asp:TextBox runat="server" id="chatid" class="textbox" size="20" /></p>
<p>Msg:<asp:TextBox runat="server" id="chatmsg" class="textbox" size="20" /></p>
<p><asp:Button runat="server" class="submit" OnClick="submit_chat" Text="chat"/></p>
|
Anyway, so there's the button and the corresponding sub directly above it. I'm starting to think this is too simple to work.
Also, above in the script, is an area where I just made something up as a placeholder for my idea about how to finish the script in that area, but I'm not sure exactly how to finish that area either, so help is needed.
edit: Took out the html, body, and script tags because I think the forum was trying to read it... _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
|
Back to top |
|
|
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Tue Nov 21, 2006 5:14 pm Post subject: |
|
|
Um...yeah...well I tried posting that but the forum glitched and gave me a 500 error.. Anyway they're in there. _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
|
|