Game Development Community

help me with this and I'll help u back

by Nermion · in General Discussion · 12/15/2001 (3:25 pm) · 3 replies

Here is the deal, I need someone badly to help me with some jscripting. I have few questions about how I would do some things in jscript and html. It's simple stuff yet I haven't been able to figure it out. If you are a pro at jscript or help me with my problem I will back you up on the favour. I'll offer you my modeling skills for any models you might need for your project.

I am trying to accomplish the following:
At my programming job I have to implement a 2d joystick in webrowser. Every time I move joystick (which is controled with the mouse) I need to send the request to cgi script on the server, something like this
http://121.121.121.121/cgi-bin/control?pan=1&tilt=1
My problem is that I dont wont' to open new url just to send this command and I dont won't it in the same window I am currently in since then it would be imposible to control the joystick smootly.
Now I have less interactive version of control where you press the buttons up, down, left, right, and directions in between of all of these. It html version and is prety simple. I just send the request thru a non existing frame, something like
Step right

I want to do something like this in jscript but it must happen when I move the mouse over the joystick. I got the joystick programmed but I can't figure out how to send the request thru non-existing frame thingy like I do in html where it works fine. In html request being sent without needing to open the new window for it or use the current window to send the request.

If anyone can figure this out, I will appreciate it greatly and will be helping you with any modeling request you may have.

I've uploaded some few samples of my work here
so anyone intersted can check out my 3d modeling skills...
http://gema.freehosting.net/3d.html

Anyone can figure this out, plz post here or email me. Any other suggestions on the problem are welcommed.

#1
12/15/2001 (11:23 pm)
Gema,

Here is an idea for you.

Im not sure what your cgi program is supposed to do, but if you just want to pass data to it:

Modify it to redirect to a blank, 1x1 pixel image. Give the image a name and id tag: img src=something.cgi name=cgi id=cgi

Now, when your event occurs that you want to pass the pan/tilt values to the cgi app, do this javascript:

function joymove(x,y)
{
cgi.src="something.cgi?pan=" + x + "&tilt=" + y;
}

That will pass the new values to your cgi program. However, in of itself not very impressive, what it demonstrates is how to pass information to a cgi app without having to reload a html page. Kinda like passing hidden information ;)

Regards,
Mark Williamson
#2
12/16/2001 (4:24 am)
This is just what I wanted, it works perfectly. I never though of this. I may have few other questions later, i hope you'll be around :)
Feel free to take me on my offer and request some modeling from me :)
#3
12/16/2001 (7:30 am)
Seems you get your answer Gema ;)
You also work during sunday !!! What a hard life, the developper's life ;)

cu