am trying to open a new web form in a Jquery Mobile panel. I am trying to open a panel on webform3.aspx and trying to call a new web form called webform2.aspx from webform3.aspx. Below is my code:
Panel on webform3.aspx works fine and the radio button also displays well, but when I click on submit button, nothing happens. The code does not go to code behind. The code behind for submit button is like so:
Below is the screenshot of what I am seeing and clicking on submit button does not do anything. I want the control to go Submit_Click event when the submit button is clicked. I don't want to use window.open
really ancient history. not sure why you would be using a dead project (no updates in 4 years, but you are using webforms).
If I remember, jquery mobile renders the new page off-screen then uses a transform to display. you need to define the pages the way it expects. I don't see any [data-role="page"] on your mark-up, so the next page is empty. follow the documentation
for defining pages:
Re: opening a new web form in a jquery mobile panel
Aug 01, 2020 08:24 PM|anjaliagarwal5@yahoo.com|LINK
I am very new to Jquery mobile. I edited my code, but I still don't see the new webform in the panel. below is my code for the main page and the page where I am trying to open the panel:
I have tried your codes and I can see the new webform in the panel. However, one problem is that every time I click the button and the panel will popup and then disappear very quickly.
In your codes, you load the new web form every time you open the panel using the event "panelbeforeopen". I use another event "panelcreate" and the problem is gone.
Moreover, if you want to apply the language options to every page, you could add the panel to master page. You are using web forms so that you should take advantage of the framework. It is not necessary to use jquery mobile in your project as you will still
need to code more to handle the language option page's event.
Hope this can help you.
Best regards,
Sean
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Re: opening a new web form in a jquery mobile panel
Aug 04, 2020 04:48 PM|anjaliagarwal5@yahoo.com|LINK
Hi Sean,
Our business side wants the look and feel of this type of Panel and that's why I tried the JQM Panel. I used the modal window before, but they didnt like it.
I tried the code and as soon as I click on the submit button. The entire panel expands and covers the original page. I want the panel to close too when the submit button is clicked. Below is the code.
Member
511 Points
1273 Posts
opening a new web form in a jquery mobile panel
Jul 29, 2020 03:48 PM|anjaliagarwal5@yahoo.com|LINK
am trying to open a new web form in a Jquery Mobile panel. I am trying to open a panel on webform3.aspx and trying to call a new web form called webform2.aspx from webform3.aspx. Below is my code:
on WebForm2.aspx, I just have two simple radio buttons and a submit button, below is my code:
Panel on webform3.aspx works fine and the radio button also displays well, but when I click on submit button, nothing happens. The code does not go to code behind. The code behind for submit button is like so:
Below is the screenshot of what I am seeing and clicking on submit button does not do anything. I want the control to go Submit_Click event when the submit button is clicked. I don't want to use window.open
Member
511 Points
1273 Posts
Re: opening a new web form in a jquery mobile panel
Jul 29, 2020 05:18 PM|anjaliagarwal5@yahoo.com|LINK
any help on this will be highly appreciated.
All-Star
58184 Points
15655 Posts
Re: opening a new web form in a jquery mobile panel
Jul 29, 2020 07:43 PM|bruce (sqlwork.com)|LINK
really ancient history. not sure why you would be using a dead project (no updates in 4 years, but you are using webforms).
If I remember, jquery mobile renders the new page off-screen then uses a transform to display. you need to define the pages the way it expects. I don't see any [data-role="page"] on your mark-up, so the next page is empty. follow the documentation for defining pages:
https://demos.jquerymobile.com/1.4.5/pages/
Member
511 Points
1273 Posts
Re: opening a new web form in a jquery mobile panel
Aug 01, 2020 08:24 PM|anjaliagarwal5@yahoo.com|LINK
I am very new to Jquery mobile. I edited my code, but I still don't see the new webform in the panel. below is my code for the main page and the page where I am trying to open the panel:
Below is the code for the page where I have the radio buttons:
any help will be higly appreciated.
Contributor
2870 Points
843 Posts
Re: opening a new web form in a jquery mobile panel
Aug 04, 2020 03:39 AM|Sean Fang|LINK
Hi anjaliagarwal5@yahoo.com,
I have tried your codes and I can see the new webform in the panel. However, one problem is that every time I click the button and the panel will popup and then disappear very quickly.
In your codes, you load the new web form every time you open the panel using the event "panelbeforeopen". I use another event "panelcreate" and the problem is gone.
You could refer to below codes:
<div data-role="page"> <div id="languagePanel" class="ss-panel-language ui-panel ui-panel-position-right ui-panel-display-overlay ui-panel-closed ui-body-inherit ui-panel-fixed ui-panel-animate" data-role="panel" data-position="right" data-display="overlay" data-position-fixed="true"> <div class="ui-panel-inner"> <div id="languagePanelInternal" class="ss-panel-language-internal"></div> </div> </div> <a href="#languagePanel" class="ss-header-actions-language ui-link"> <span style="margin-left: 60%">test</span> </a> <script> var languageUrl = "WebForm2.aspx"; $("#languagePanel").on("panelcreate", function () { $("#languagePanelInternal").load(languageUrl, function () { $("#languagePanelInternal").enhanceWithin(); }); }); </script> </div>
The WebForm2 is exactly the same as you posted.
Moreover, if you want to apply the language options to every page, you could add the panel to master page. You are using web forms so that you should take advantage of the framework. It is not necessary to use jquery mobile in your project as you will still need to code more to handle the language option page's event.
Hope this can help you.
Best regards,
Sean
Member
511 Points
1273 Posts
Re: opening a new web form in a jquery mobile panel
Aug 04, 2020 04:48 PM|anjaliagarwal5@yahoo.com|LINK
Hi Sean,
Our business side wants the look and feel of this type of Panel and that's why I tried the JQM Panel. I used the modal window before, but they didnt like it.
I tried the code and as soon as I click on the submit button. The entire panel expands and covers the original page. I want the panel to close too when the submit button is clicked. Below is the code.
and the webform2 form is like so:
any help will be greatly appreciated.
All-Star
58184 Points
15655 Posts
Re: opening a new web form in a jquery mobile panel
Aug 05, 2020 02:47 AM|bruce (sqlwork.com)|LINK
I still don’t understand why you are using (and learning) a deprecated and unsupported framework for a new project.