|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
What I would suggest is that you write a function that is called by a onFocus handler or even an onChange handler. Basically what you would be saying is "when this state changes, run this function."
- DB
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
Try this: Put this in the head tag of your html: And in your input tag, put the following: or Keep in mind that you can put really anything in that function call, but this is the best way to achieve the results that you are looking for. - DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
do ya think that works with a send field?
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
I'm not sure what you mean by a send field. By default, if there is only one textfield then by hitting the enter key the form is automatically submitted (Gurus: Please correct me if I'm wrong, but I thought this was globally accepted or is it just IE?)
If you want to submit a form in this manner (which I don't suggest,) then you can put an onSubmit handler.
What is it exactly that you are trying to accomplish?
- DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
i insert a poll script into my page. there are just some radio fields and one to submit. i want that it'll open a new browser window (with definied px) which shows the results of the poll. so i can write a close js into the result page instead a back buttom or some other **** ... :rolleyes:
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
I still don't understand why, especially if you're using perl, you can't just submit the form via a button object? That would make things a lot easier on you.
- DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
hmm... i never thought about this. but i dont know the code to let it open a new window. sorry, i'm not the best perl writer.
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
Don't worry about it. That's why I'm here. Now, I can't help you with the perl, but consider this:
1) You submit a form to a cgi script. 2) The script is processed and takes the user to pageA.html. 3) IN THIS PAGE, you put the code that I listed for you above, with the one exception that you put the function call in the body tag with an onLoad instead.
Does that help?
- DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
hmm... you're very kind, but i dont understand everything... you said the cgi preceeds to an other page. got it. and there it opens the new window onLoad? got it. but i'd like to stay on the page were the form for the cgi is. isnt this possible?
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
Yes, it is. Just put a function call in your form tag using the onSubmit handler instead of the actual action attribute. Granted, you're going to have to code a little more than you normally would (had you done all of this in perl,) but it should still work just the same.
- DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
could you give me a hint? i dont know how to code it 
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
Hmmm ... let me see what I can come up with. You know, you could always find a free poll script and modify it. That might help you out in the meantime. I can't promise anything...
- DB
|
|
|
|
Joined: May 2001
Posts: 33
Member
|
Member
Joined: May 2001
Posts: 33 |
yeah, this was a free poll script, but for ubb. i changed the code... now it fits into my design (it's not any more in the board). it was an old poll hack, i think for ubb 5 or so. my problem is that i cant write perl. i just can change the code 
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
Joined: May 2000
Posts: 1,168 |
Ahh... well then I think it might be time for you to stop by your local bookstore.
- DB
|
|
|
|
Joined: Feb 1999
Posts: 1,379
Programmer
|
Programmer
Joined: Feb 1999
Posts: 1,379 |
umm. to make a form open in another window, put the target="" inside the
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|