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

   input with _blank to Del.icio.us Add to del.icio.us
  Digg input with _blank Digg it
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 (), 33 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
Today at 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
blaaskaak 12
AllenAyres 10
FREAK1 7
Mike L_dup1 4
Chris Bale 4
Ian_W 4
tackaberry 4

 

 

 
fusionbb message board php hacks