Simple Javascript help Watch

This discussion is closed.
EI_123
Badges: 0
Rep:
?
#21
Report 14 years ago
#21
(Original post by amazingtrade)
All I need to solve my problem is a simple javaescript that says:

if enter is pressed then refresh.


You can't do that in ASP because it won't be real time. If I can get that working I can get the chat working properly without eating all my bandwidth.
Anyway is a terrible bad solution refreshing a whole page ...
0
elpaw
Badges: 15
Rep:
?
#22
Report 14 years ago
#22
(Original post by amazingtrade)
All I need to solve my problem is a simple javaescript that says:

if enter is pressed then refresh.


You can't do that in ASP because it won't be real time. If I can get that working I can get the chat working properly without eating all my bandwidth.
onkeypress()="if(window.event.ke ycode==13){refresh()}"

where refresh() is the function to refresh the window or frame
0
Alaric
Badges: 1
Rep:
?
#23
Report 14 years ago
#23
Clientside method: Java applet using sockets. Simple. (the irc protocol isn't too bad to do simple stuff) - look at iirc jIRC for code examples

Serverside method: Oooh nasteh, any server side scripting language that allows you to connect to sockets... PHP will, I expect ASP can. You keep the page refeshing often which is nasty, but you could look at how CGI-IRC does it.

(This is all on top of the IRC protocol btw).

Really don't bother with javascript for doing a chat room unless you _really_ have to.

Alaric.
0
elpaw
Badges: 15
Rep:
?
#24
Report 14 years ago
#24
(Original post by amazingtrade)
All I need to solve my problem is a simple javaescript that says:

if enter is pressed then refresh.


You can't do that in ASP because it won't be real time. If I can get that working I can get the chat working properly without eating all my bandwidth.
or you could also refresh the page whenever the form is submitted, which cancels out the checks necessary to see if enter has been pressed

<form bla bla bla onsubmit="refresh()">

where refresh() is the function to refresh the window or frame
0
AT82
Badges: 0
Rep:
?
#25
Report Thread starter 14 years ago
#25
Thanks, well I have to get this up and running tonight and haven't done PHP or CGI yet. I know this is not the ideal solution but its only going to be online for a week.

Thanks for all your input.
0
EI_123
Badges: 0
Rep:
?
#26
Report 14 years ago
#26
(Original post by amazingtrade)
Thanks, well I have to get this up and running tonight and haven't done PHP or CGI yet. I know this is not the ideal solution but its only going to be online for a week.

Thanks for all your input.
You are welcome, the best solution would be an applet.
0
elpaw
Badges: 15
Rep:
?
#27
Report 14 years ago
#27
(Original post by Eternal Idol)
"I think the language is self-evident as it is the title of the thread."

At least I know what I'm talking about Mr Genius.
I can do it in Assembly, isn't that hard.

Try to do it in JavaScript ...
so im not a programmer..... does that mean i am not worthy to live? you would rather have the whole world filled with programmers?
0
Alaric
Badges: 1
Rep:
?
#28
Report 14 years ago
#28
(Original post by amazingtrade)
Thanks, well I have to get this up and running tonight and haven't done PHP or CGI yet. I know this is not the ideal solution but its only going to be online for a week.

Thanks for all your input.
If you insist on not doing an applet then perhaps consider seeing if an iframe can hold the content so that the whole page doesn't need to refresh.

Alaric.
0
elpaw
Badges: 15
Rep:
?
#29
Report 14 years ago
#29
(Original post by Alaric)
If you insist on not doing an applet then perhaps consider seeing if an iframe can hold the content so that the whole page doesn't need to refresh.

Alaric.
it is already in an iframe. thats why javascript can be used on it. the only problem is that when it refreshes, it goes back to the top of the page.
0
EI_123
Badges: 0
Rep:
?
#30
Report 14 years ago
#30
(Original post by elpaw)
so im not a programmer..... does that mean i am not worthy to live? you would rather have the whole world filled with programmers?

Nobody said that, but you could save your arrogant comment,
"I think the language is self-evident as it is the title of the thread." ,
if you don't know what are we talking about.
0
AT82
Badges: 0
Rep:
?
#31
Report Thread starter 14 years ago
#31
Are these Java applets ready made? Do they have loads of banner adds with them and stuff? If not I would consider using an applet, it may solve a lot of my problems.
0
elpaw
Badges: 15
Rep:
?
#32
Report 14 years ago
#32
(Original post by Eternal Idol)
Nobody said that, but you could save your arrogant comment,
"I think the language is self-evident as it is the title of the thread." ,
if you don't know what are we talking about.
how is that comment arrogant?
0
EI_123
Badges: 0
Rep:
?
#33
Report 14 years ago
#33
(Original post by amazingtrade)
Are these Java applets ready made? Do they have loads of banner adds with them and stuff? If not I would consider using an applet, it may solve a lot of my problems.
There must be some out there but I advice you to write your own. It would give you an invaluable knowledge.
0
EI_123
Badges: 0
Rep:
?
#34
Report 14 years ago
#34
(Original post by elpaw)
how is that comment arrogant?
You are telling me 'don't you read the topic? are you an idiot?'.
0
elpaw
Badges: 15
Rep:
?
#35
Report 14 years ago
#35
(Original post by Eternal Idol)
You are telling me 'don't you read the topic? are you an idiot?'.
where did i say idiot?
0
EI_123
Badges: 0
Rep:
?
#36
Report 14 years ago
#36
(Original post by elpaw)
where did i say idiot?
"I think the language is self-evident as it is the title of the thread."

If I can't read a topic and see something that's SELF-EVIDENT I must be an idiot...
0
AT82
Badges: 0
Rep:
?
#37
Report Thread starter 14 years ago
#37
(Original post by Eternal Idol)
There must be some out there but I advice you to write your own. It would give you an invaluable knowledge.
I've just seen my notes for my internet programming next year, its all about using Java to chat a chat applet. I shall have a look to see if I can use them.
0
elpaw
Badges: 15
Rep:
?
#38
Report 14 years ago
#38
(Original post by Eternal Idol)
"I think the language is self-evident as it is the title of the thread."

If I can't read a topic and see something that's SELF-EVIDENT I must be an idiot...
if you think that then it's your own fault you think i called you an idiot. because nowhere did i say that you were.

and then you said i was an idiot for not knowing any programming
0
EI_123
Badges: 0
Rep:
?
#39
Report 14 years ago
#39
(Original post by amazingtrade)
I've just seen my notes for my internet programming next year, its all about using Java to chat a chat applet. I shall have a look to see if I can use them.
Hehehe, that's what I was talking about. The ideal way is to make an applet that uses sockets.
0
EI_123
Badges: 0
Rep:
?
#40
Report 14 years ago
#40
(Original post by elpaw)
if you think that then it's your own fault you think i called you an idiot. because nowhere did i say that you were.

and then you said i was an idiot for not knowing any programming
No, I said that you shouldn't be talking like if you were Kevin Mitnick if you don't know anything of what we were talking about.

What kind of reaction were you waiting with an answer like that?
Indeed I didn't even asked to you ... you entered the conversation to say 'hey you, this is self evident, we are talking about javascript'...
0
X
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Do you think the internet has made political discussion more aggressive?

Yes (17)
94.44%
No (1)
5.56%

Watched Threads

View All