[rz] Browser Size Activated Object *** UPD Jul-26-2014 ***

In this section you can announce self-made paid extensions.
*** THIS SECTION CONTAINS PAID EXTENSIONS ONLY ***
User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

[rz] Browser Size Activated Object *** UPD Jul-26-2014 ***

Post by [RZ] » Sun Feb 02, 2014 5:17 pm

[rz] SAO v1.2

Browser Size Activated Object (aka "SAO").

This extreme lightweight extension allows you to activate and deactivate objects based on the visitor's browser size.
Redirection is also supported; so, it can be used as mobile redirection based on the device's screen resolution.
Show alerts based on the page design/scheme (portrait/landscape).
Multi-instance supported, this allows many configurations in the same page.
Of course, it is limited by your creativity!


DEMO


HTML 4.01 Transitional
W3C compliant


* New inversion 1.2

- Width and height parameters can be calculated based on the browser size or the physical screen size.
- The visitor can optionally be prompted prior to the redirection.
- The prompt feature automatically detects a [rz] Confirm() instance.

* New in version 1.1.0.2

- Fixed an introduced bug detecting some type of devices.
- Improved code.

* New in version 1.1

- Object deactivation.
- Can activate (show) or deactivate (hide) more than one object in the same instance and under the same conditions; if this is your case, just enter each object id separated by commas, i.e. Layer1, Layer2, etc.
- Event(s) on activation and on deactivation; user defined function call in javascript format: myfunction();
- Matching events can be triggered (or not) when the page is loaded or when the condition is reached.
- Improved code; all events are tiggered only once, this means, when the browser's conditions are changed instead of in each resize.
- Device condition (based on the user agent string); can be: determinant - this means no matter what the other conditions are, i.e. useful for mobile redirection), must match - the conditions must match with the device in order to trigger the proper activations, deactivations and events; this option can even be excluded.
- Improved screen size and orientation calcs.


How to use?

- Design your page as you usually do.
- Add an object (often a layer with the appropiate legend) as the last object (the topmost position).
- Finally, add the extension; must be over the layer or the object to be shown (if you use a layer, due to technical reasons, it is advisable to put the extension within it).
- Open the extension properties dialog and set-up the parameters; properties with their descriptions are self-explanatory.
- You can use a redirection link instead of display an object; this can be useful i.e. to redirect to a mobile version of your site according to the device's resolution.
- Run a preview and resize your browser to see it in action.

Enjoy!
Last edited by [RZ] on Sat Jul 26, 2014 8:15 pm, edited 3 times in total.

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object

Post by haakoo » Sun Feb 02, 2014 11:13 pm

Nice and did I say Nice :wink:

Hans

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object

Post by [RZ] » Mon Feb 03, 2014 6:16 am

thanks haakoo!

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object

Post by haakoo » Mon Feb 03, 2014 8:15 am

RZ

Could you add a function call to the script
Or even better call wb events.

Hans

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object

Post by [RZ] » Mon Feb 03, 2014 12:40 pm

i'm currently working in an update
can you explain your post better, perhaps i can add this new feature with the new release

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object

Post by haakoo » Mon Feb 03, 2014 1:13 pm

Now you can open a subpage or show/hide layer(element)
But if you could add a field to call a self defined javascript function it would be great.

One could call jquery functions to resize/rotate,.... htmlobjects within a single page depending on landscape/portrait mode.
Hence creating live updating elements in mobile browsers

Hans

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object

Post by [RZ] » Mon Feb 03, 2014 1:25 pm

well, i thought about an user defined function call (when the defined sizes are reached, a sort of event) but for a reason that i cannot remember right now, i removed it -- it seems that this feature is very important, and i agree with you
i'm checking out if some specific mobile extra feature can be added, but you know, mobiles are better and better every day (read: minute), so i removed from my scripts the traditional mobile detection and i work only based on screen resolutions
in just a few words i got your idea, thank you for your suggestion, will see what can be done
hope i can release the upgrade by today

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object

Post by haakoo » Mon Feb 03, 2014 1:30 pm

Thanks,I'll see it when you're done

Hans

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object *** UPDATED Feb-03-2014 **

Post by [RZ] » Mon Feb 03, 2014 5:16 pm

* New in version 1.1

- Object deactivation.
- Can activate (show) or deactivate (hide) more than one object in the same instance and under the same conditions; if this is your case, just enter each object id separated by commas, i.e. Layer1, Layer2, etc.
- Event(s) on activation and on deactivation; user defined function call in javascript format: myfunction();
- Matching events can be triggered (or not) when the page is loaded or when the condition is reached.
- Improved code; all events are triggered only once, this means, when the browser's conditions are changed instead of in each resize.
- Device condition (based on the user agent string); can be: determinant - this means no matter what the other conditions are, i.e. useful for mobile redirection), must match - the conditions must match with the device in order to trigger the proper activations, deactivations and events; this option can even be excluded.
- Improved screen size and orientation calcs.

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object *** UPDATED Feb-03-2014 **

Post by haakoo » Mon Feb 03, 2014 8:53 pm

Hi RZ,

Thanks for the update.
There seems to be a script error in the deactivate option(but it works)
Simply entered Layer2 in deactivate field and it gave the error below.
When removing Layer2 from field, error is gone too

Hans

Code: Select all

Timestamp: 3-2-2014 21:47:28
Error: TypeError: document.getElementById(...) is null
Source File: file:///D:/TestMap/index.html
Line: 50

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object *** UPDATED Feb-03-2014 **

Post by [RZ] » Mon Feb 03, 2014 9:06 pm

from the attached info file:

"- Finally, add the extension; must be over the layer or the object..."

in order to reduce the code and make it to work faster and smoother at startup, i removed some validations, apologies for that
please move the extension and be sure it is on top of all of the involved objects that points to

haakoo
 
 
Posts: 186
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Re: Browser Size Activated Object *** UPDATED Feb-03-2014 **

Post by haakoo » Mon Feb 03, 2014 9:47 pm

Yup that's it,
Overlooked that part of the txt file.
Must say it's a great piece of coding,so once again thanks.

Hans

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object *** UPDATED Feb-03-2014 **

Post by [RZ] » Mon Feb 03, 2014 9:53 pm

thank you for clearing this up
enjoy

User avatar
[RZ]
 
 
Posts: 2107
Joined: Tue Nov 04, 2008 12:08 pm

Re: Browser Size Activated Object *** UPDATED Apr-13-2014 **

Post by [RZ] » Sun Apr 13, 2014 10:03 am

* New in version 1.1.0.2

- Fixed an introduced bug detecting some type of devices.
- Improved code.

User avatar
Patrik iden
 
 
Posts: 535
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Browser Size Activated Object *** UPDATED Apr-13-2014 **

Post by Patrik iden » Tue Apr 15, 2014 5:30 pm

Hello, How can i download your extensions?

Thank you.

Post Reply