BullGuard Antivirus Sale - 60% Off with openElement !
Forum openElement Homepage
Forum Home Forum Home >

openElement

> Dynamic OE - Databases, etc
  New Posts New Posts RSS Feed - How can submit the form in BaseLayer?
  FAQ FAQ  Forum Search   Register Register  Login Login

How can submit the form in BaseLayer?

 Post Reply Post Reply Page  12>
Author
Message
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Topic: How can submit the form in BaseLayer?
    Posted: Oct 13 2016 at 5:39pm
Hi OE team,

My webpage has a multilayer structure such as:

BaseLayer --- BaseLayer_summary ---Summary_main
                  \                                       \_Summary_system_info
                   \                                       \_Summary_laser_iinfo 
                    \_BaseLayer_system     
                     \
                      \
                       \_BaseLayer_advanced

Now, Scenario is that
    1) BaseLayer_summary has RGB control bars (three bars).
    2) These RGB control bars are shown always and can be controlled wherever user navigate under BaseLayer_summary.
    3) User need to control RGB power of laser whenever he/she need to adjust it.

However, the submit form includes only Form Elements which are used in same page, for example,
I want to submit it on Summary_main but the submit form in Summary_main show only Form Elements which are used in Summary_main page.

How can I submit the Form Element which is used in BaseLayer?
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Oct 13 2016 at 8:38pm
Hi,

You can't just add those several field elements onto each page? There's no simple way of including layer fields into a page's form... You can get their values with JavaScript and put into some elements present on the page and included into the form, but it's not necessarily easier
Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 3:17am
Could you give an example that getting the value from BaseLayer page at sub-layer page using JavaScript?
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 8:34am
Well, for example you can use one (invisible to user) field for each base layer field on your page, note its ID as well as ID of corresponding base layer input, then do someting like


$(function(){

  $('#WEbaseLayerInput1').change(function(){ // on base layer's input change by user
    $('#WEpageInput1').val($('#WEbaseLayerInput1').val()); // copy the value to page input
});

  $('#WEbaseLayerInput2').change(function(){
    $('#WEpageInput2').val($('#WEbaseLayerInput2').val());
});

  $('#WEbaseLayerInput3').change(function(){
    $('#WEpageInput3').val($('#WEbaseLayerInput3').val());
});

});


Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 8:35am
And of course you need to include those 3 page inputs in the form configuration


Edited by Dmit OE - Oct 14 2016 at 8:35am
Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 3:52pm
Dmit OE, Thank you so much! I will try it.

By the way, in order to use the slider form by JQuery Mobile, I put jquery.mobile.css and jquery.mobile.js onto Header of source such as:
// example
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

It works but I have a problem.

After putting jquery.mobile, the javascript code of coping value from Range form to Text box form does not work anymore,

// example of the javascript code of coping value from Range form to Text box form
$('.Rrange  input').change(function(){
    $('.Rrange-mirror  input').val($(this).val()); // copy value from here to "mirror" field
}); // immediately run the code "on change"

Could you advise to me what I made a mistake on it?
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 4:24pm
You really need to upload your website somewhere, in some temporary location on any available hosting, and give the link to see what's wrong... (no need for PHP to work so no need to upload your datas etc. I think) Otherwise if you have no other choice, send the project to me.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group
Avatar

Joined: May 31 2012
Status: Offline
Points: 5007
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Oct 14 2016 at 4:24pm
P.S. You shoudl remove this linefrom your code:

<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: Oct 17 2016 at 12:56pm
Thanks Dmit OE,

It would be better to send whole project folder to you, personally.
Could you inform your contact information to me privately?
Back to Top
djju1029 View Drop Down
Senior Member
Senior Member
Avatar

Joined: Aug 02 2016
Location: the US
Status: Offline
Points: 126
Post Options Post Options   Thanks (0) Thanks(0)   Quote djju1029 Quote  Post ReplyReply Direct Link To This Post Posted: Oct 17 2016 at 2:02pm
1) When I remarked this line, the result was same.

2) When I remarked the jquery.mobile line as well as following, the value was copied to text box form what I want.
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<!-- <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> -->
<!-- <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> -->

Question? Does jquery.mobile affect the proper operation of jquery script we use in OE?


Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.11
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0,031 seconds.