Prev: How to get the html elements of Iframe from the Parent page by javascript
Next: jQuery vs. My Library
From: David Mark on 22 Jan 2010 10:51 Scott Sauyet wrote: > On Jan 22, 7:57 am, Diddum <g.re...(a)iit.cnr.it> wrote: >> What I want to obtain: >> When the user clicks on the button, instead of loading always >> foobar.php, >> I want that the form invokes randomly, say, fub1.php and fub2.php. > > Do you want to consider users who do not have Javascript available and > on at your site? They're a pretty small minority, but they certainly > exist. What's the most popular add-on for FF? I've heard that it is Noscript of late. Nor surprising considering how poorly most documents are scripted (the result of three years of jQuery mass hysteria). Then there are those pesky blind people, corporate users with overzealous network admins, people using Blackberry browsers who don't know or care to enable JS, etc., etc. There is no point in thinking of this "group" as a small minority. It just opens the door for slovenly development. > If you did this on the server, it work for everyone. Right. No need to exclude users without cause. The first excuse I usually hear is "we didn't have time". Of course, that's backwards. They had time to foul things up, didn't they?
From: Diddum on 22 Jan 2010 11:14 David Mark wrote: Scott Sauyet wrote: > If you did this on the server, it work for everyone. Thanks. That is what I actually already do. As I explained (poorly, it appears) is that in the solution above the random choice is made once at server side and so it is somehow "frozen" in the document. If a user uses the same form multiple times hitting the "back" button on the browser, the form will always invoke either fub1.php or fub2.php, not a mix of the two as I wanted. Now, I use both techniques, that is I use php to set the first value of "action" randomly. Then, I use onSubmit in the form to force a random change of the action value when the user tries to submit the form. In this way, if javascript is not turned on, about half of the users will repeatedly invoke fub1.php and other half will invoke fub2.php, which is subpar but OK. If javascript is enabled, the single user, by using the form several times, will probably see both pages (with high probability). bye, g.
From: Jorge on 22 Jan 2010 12:01 On Jan 22, 4:51 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > Scott Sauyet wrote: > > On Jan 22, 7:57 am, Diddum <g.re...(a)iit.cnr.it> wrote: > >> What I want to obtain: > >> When the user clicks on the button, instead of loading always > >> foobar.php, > >> I want that the form invokes randomly, say, fub1.php and fub2.php. > > > Do you want to consider users who do not have Javascript available and > > on at your site? They're a pretty small minority, but they certainly > > exist. > > What's the most popular add-on for FF? I've heard that it is Noscript > of late. Nor surprising considering how poorly most documents are > scripted (the result of three years of jQuery mass hysteria). > > Then there are those pesky blind people, corporate users with > overzealous network admins, people using Blackberry browsers who don't > know or care to enable JS, etc., etc. There is no point in thinking of > this "group" as a small minority. It just opens the door for slovenly > development. Let's put this heading in the FAQ: <h1>"Many regulars in this group would like you to note -in the first place- that this silly thing called JavaScript ought to be turned off in your browser, to begin with."</h1> -- Jorge.
From: Scott Sauyet on 22 Jan 2010 12:25 On Jan 22, 12:01 pm, Jorge <jo...(a)jorgechamorro.com> wrote: > Let's put this heading in the FAQ: > <h1>"Many regulars in this group would like you to note -in the first > place- that this silly thing called JavaScript ought to be turned off > in your browser, to begin with."</h1> Good idea, but I'd suggest we phrase it a little differently: "Many regulars in this group would like you to note that there are a number of users who are not willing or not able to use Javascript, so it's a good idea to build your documents in a manner that allows reasonable access to your content without Javascript enabled." -- Scott
From: Jorge on 22 Jan 2010 12:43 On Jan 22, 6:25 pm, Scott Sauyet <scott.sau...(a)gmail.com> wrote: > > "Many regulars in this group would like you to note that there are a > number of users who are not willing or not able to use Javascript, so > it's a good idea to build your documents in a manner that allows > reasonable access to your content without Javascript enabled." Once you've crossed a certain line there's no way to achieve "reasonable access" anymore and then the "this site requires JavaScript" message becomes appropriate. And crossing it is not a sin, as some regulars will try to make you believe. -- Jorge.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: How to get the html elements of Iframe from the Parent page by javascript Next: jQuery vs. My Library |