Oh man, I can't believe I added in a Javascript feature without testing it
on IE. Then again, if I had seen that it didn't work in IE I might have just
given up on the whole thing, so maybe it was all for the best... in any
case, this new code seems to work perfectly across all browsers. Thanks a
lot for the discovery, and the fix.

-Yaron


On Sat, Sep 20, 2008 at 12:56 AM, Guoqian Jiang <[EMAIL PROTECTED]> wrote:

> Yaron,
>
> While popup warning works well in Firefore, it doesnot work for IE7.
>
> I made a Google search and got a workaround.
>
>
>     $confirm_script =<<<END
>     // ask the user to confirm before leaving the page - due to
>     // Javascript strangeness, the question itself is hardcoded in
>     // English and can't be changed
>     function confirm_text(evt) {
>         // show this confirmation message only if the user didn't
>         // click on a form element
>         //if (evt.target.className != "createbox") {
>             //return "Changes to the form will not be saved.";
>         //}
>   var message = 'Changes to the form will not be saved?';
>   if (typeof evt == 'undefined') {
>     evt = window.event;
>   }
>   if (evt) {
>     evt.returnValue = message;
>   }
>   return message;
>
>     }
>     window.onbeforeunload = confirm_text;
>
> END;
>
> see: http://www.daniweb.com/forums/thread109113.html
>
> I tested this code and it works for both browsers. Hope helpful.
>
> -Guoqian
>
> ------------------------------
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: [Semantic Forms] Re: Version 1.3.1 - "default=current user", popup
> warning for leaving a form, etc.
> Date: Fri, 19 Sep 2008 20:53:10 +0000
>
>
> Yaron,
>
> Cool. Popup warning works well.
>
> Thanks,
>
> -Guoqian
>
> ------------------------------
> Date: Fri, 19 Sep 2008 15:07:32 -0400
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: [Semantic Forms] Version 1.3.1 - "default=current user", popup
> warning for leaving a form, etc.
>
> Hi all,
>
> Version 1.3.1 of Semantic Forms has been released. Additions and changes in
> this version include:
>
> - a field can now be set to hold the current user's username by default,
> through the new 'default=current user' value.
>
> - forms can now be set to warn the user with a popup message if they try to
> leave without saving the page. By default this is turned off, but it can be
> turned on using the new "$sfgConfirmFormExit" flag. Due to some Javascript
> strangeness, the text in the popup is hardcoded - it reads "Are you sure you
> want to navigate away...", etc. in English, regardless of the language of
> the user. This is a problem, and I don't know a way around it, which is part
> of the reason it's off by default.
>
> - there were various fixes to the new template-call parsing code - these
> were added in subsequent releases of version 1.3, but if you got version 1.3
> before they went in, they're new. :)
>
> - alternate forms for properties, which weren't working since version
> 1.2.9, are now working again.
>
> - red links are now working for MediaWiki 1.14 - I added a hook into the
> MediaWiki code, that went into version 1.13, that eliminated the need for
> the code patch to get red links to point to forms. However, about a month
> ago this hook was removed, as part of a general restructuring of the code
> (bringing my contributions to MediaWiki itself back to zero). It was
> replaced with some other hooks, and SF now uses those as well if they're
> available.
>
> - the Javascript for date validation was improved, so that date fields can
> be set to "mandatory".
>
> - the Javascript in the special upload window was improved to be able to
> work with MediaWiki 1.14.
>
> - the Javascript was also modified, using code from Tal Shahar, to try to
> improve the ability to have an uploadable field in a multiple-instance
> template - this still doesn't work fully, but hopefully somehow we can
> figure out a way to get around the remaining problems.
>
> - the version used of the YUI Javascript library was updated from 2.5.1.to
> 2.5.2.
>
> - the 'CreateTemplate' page can now create a template with no fields - this
> wasn't working before.
>
> - also, some of the class structure for SF_CreateTemplate.php was improved.
>
> - the 'size' parameter for fields that corresponded to a list of values was
> ignored before, with the size always getting set to 100. This has been
> fixed.
>
> - language support was added for Egyptian Arabic (yes, apparently it's
> slightly different from regular Arabic - this was a big topic of discussion
> at Wikimania).
>
> -Yaron
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Semantic Forms" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/semantic-forms?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to