php forum
php mysql forum
php mysql smarty
 
Topic Options
#108294 - 05/23/01 04:59 PM input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
hi, i'm trying to open a new browser window by clicking on an input field. but it doesnt work! do you know how i can do this by an other way?

<input type="Submit" value="OK" target="_blank">
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108295 - 05/23/01 05:08 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108296 - 05/23/01 05:20 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
Try this:

Put this in the head tag of your html:

Code:
code:


And in your input tag, put the following:

Code:
code:


or

Code:
code:


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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108297 - 05/23/01 05:31 PM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
do ya think that works with a send field?
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108298 - 05/23/01 06:06 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108299 - 05/23/01 06:20 PM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
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:
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108300 - 05/23/01 06:23 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108301 - 05/23/01 06:29 PM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
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.
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108302 - 05/23/01 06:44 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108303 - 05/23/01 07:00 PM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
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?
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108304 - 05/23/01 07:13 PM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108305 - 05/23/01 07:27 PM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
could you give me a hint? i dont know how to code it frown
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108306 - 05/24/01 06:21 AM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
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
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108307 - 05/24/01 06:48 AM Re: input with _blank
ade2k Offline
Member

Registered: 05/19/01
Posts: 32
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 frown
_________________________
Admin and Webmaster of:
http://www.holybabes.de
and
http://www.ade2k.ch

Top
#108308 - 05/24/01 10:15 AM Re: input with _blank
Digital Boy Offline
Member

Registered: 05/30/00
Posts: 1871
Loc: Philadelphia
Ahh... well then I think it might be time for you to stop by your local bookstore.


- DB
_________________________
Matt Torbin
Web and Graphic Arts Engineer
Max Levy Autograph, Inc.
http://www.maxlevy.com/

Top
#108309 - 05/24/01 11:03 AM Re: input with _blank
cal Offline
Programmer

Registered: 02/19/99
Posts: 3433
Loc: London, UK | Genius: 100%
umm. to make a form open in another window, put the target="" inside the <form> tag

Just a thought smile
_________________________
http://www.iamcal.com

Top


Who's Online
0 registered (), 27 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
Today at 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
Yesterday at 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks