Posting form into a new window

M

Michael Winter

[snip]
it even works in that very quirky broswer called 'Opera'...)

What exactly is "quirky" about Opera? It's one of the best browsers
available, in my opinion.

[snip]

Mike
 
M

Michael Winter

Every browser has its quirks Mike.

I realise that, but Frances seemed to imply that Opera is awkward to
script.
Just about every UA with Java 1.4 installed will render this page
reliably,
<http://www.physci.org/test/lnf/fullwnd5.html>
..but Opera leaves rendering artifacts (possibly) related to
the exact size of the applet. More details and test results here.
<http://www.physci.org/test/lnf/>

So it does. Have you reported that to Opera Software?

[snip]

Mike
 
G

Grant Wagner

fox said:
Eli said:
No, that's not what I meant.

I wish to post from a form that appears on a web page (it's a visitor
poll) to an action= page that will appear in a newly opened window.
Using only target= in the <form> tag doesn't give you the ability to
control the window's size and attributes.

Just create a "named" window with window open and submit the form to it
by setting the target to the newly created window name [there actually
*IS* a purpose for the second argument to window.open!]:

<form onsubmit = "return handleSubmit(this)">
....

// the JS:

function
handleSubmit(f)
{
// f => form reference

// you can set these attributes in the form tag if you want
f.action = "script2call.ext";
f.method = "POST or GET"; // one OR the other
f.target = "myFormWindow";

// create your named window:
var w = window.open("","myFormWindow","AttributesList");

f.submit();
return false; // or navigate to another page...
}

I tested this in Mozilla with "Block unrequested popup windows" checked
-- and it still worked, but if the user has JS turned off, then this is
toast.. so:

<noscript>
<h3>This site requires JavaScript...</h3>

</noscript>

Or:

<url: http://jibbering.com/faq/#FAQ4_37 />

Now if you can control the chrome of the new window via JavaScript (because
the user is not overriding your choices) you will control the chrome of the
new window.

If you can not control the chrome of the new window (because JavaScript is
disabled or unavailable), you will most likely still get a new window
because of the target attribute of the <form>.

However, I can configure my browser to ignore both the window.open() and the
target attribute of the <form>, for me, the form would post into the current
window.

The <noscript></noscript> block wouldn't help prevent this because
JavaScript _is_ enabled on my browser, I'm just choosing to ignore you
attempts to open a new window. Using <noscript></noscript> as an alternative
to a script-dependant page (such as one that does <form>.submit()) indicates
a lack of understanding of current browser technology and usage patterns.

There are no longer simply two choices: 1) browser with JavaScript enabled
that you can fully control and 2) brower with no JavaScript
available/enabled.

There are many, many choices: 1) browsers that have JavaScript enabled and
block all new windows with no alternative behaviour (in which case both
window.open() and target would simply fail and the form would be posted with
no response possible), 2) browsers that have JavaScript enabled and allow
new windows, but prevent your choice of chrome (the window may appear a
different size or position than you are expecting), 3) browsers with
JavaScript enabled, but which ignore attempts at both window.open() and
target attributes and open everything in the current window (no new window
ever opens, so if you want to communicate between the opener and the opened
window, you'll have a hard time doing that), etc etc
 
M

Michael Winter

It's bold... it's medium... it's simple... it's enough.

And it's abuse of an element for no reason: the styling isn't even
necessary. HTML gives structure and meaning to a document, not
presentation.

If you really felt the need to tweak how the text was shown, use:

<style type="text/css">
noscript p {
font-size: 120%;
font-weight: bold;
}
</style>

<!-- ... -->

<noscript>
<p>This site requires JavaScript...</p>
</noscript>

How is that complicated? Show best practice, not laziness.

Mike
 
M

Michael Winter

On Mon, 27 Sep 2004 12:55:39 GMT, Michael Winter wrote:
[snip]
I realise that, but ..Opera is awkward to script.

Hey! That's kind of misleading, isn't it? :p

[snip]
Now, I'm curious to find out exactly what the second
part means. What 'bug tracking system' I could find
no reference to it in links? Or does that actually mean
"We will not be able to respond to questions and queries
through any (non existent) bug tracking system"

The questions and queries part is probably referring to the fact that they
have other support systems: forums, e-mail, mailing lists, and their own
news server.

As to the existence of the mythical tracking system, I haven't seen it
either. I was thinking about asking someone who quoted a bug by number,
but I didn't in the end.

[snip]

Mike
 
J

Jim Ley

As to the existence of the mythical tracking system, I haven't seen it
either. I was thinking about asking someone who quoted a bug by number,
but I didn't in the end.

They don't publish public bugs, this isn't unusual, it's a closed
source product of course, you can report bugs and you do get a bug
report number back - but that's as far as it goes in public, so you
can get public bug numbers, maybe you should just put a wrapper around
the bug system that logs them publically aswell as going to Opera...

I've said it before, but closed source bug tracking systems should
always report a number, and they should list in the release notes if
it's been fixed - just listing numbers like this doesn't reveal any
details of the bugginess of the product, but it does encourage users
to report bugs, as they can find out when they're fixed.

Jim.
 
L

Lasse Reichstein Nielsen

Andrew Thompson said:
Do you have any experience with their system Mike?

Well, I'm not Mike, but I have reported a few Opera bugs. If you want
personal feed-back, you must use either their forums or their
newsgroups. I only read the newsgroups, and wrt. bugs, I just ask if
it is a known bug. Sometimes I just report it without asking.

It's usually obscure Javascript bugs (like obj[""] not working
properly - that was one of the less obscure ones :), and they are
usually fixed in the next release.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top