Smart Modal disabling window? - javascript

The contractor that did our site used a version of smart modal jQuery plugin, not the one from Ben Marshall but this one:
https://code.google.com/p/esp1179/source/browse/trunk/smart-modal/jquery.smartmodal.js?r=22, on our login dialogs.
When an invalid login happens, the form seems to be disabled and I can't figure out why as I DO NOT explicitly disable the form or any of it's controls, with the exception of hiding the login button and showing the spinner.
https://www.scic.com/schedule
Click any of the register links that have a price showing for the course and then enter jibberish in the Username and password inputs.
The file that is calling the dialog is loadpopups.js.
Can someone check it out and help me figure out why it is happening? I'm about to pull out the only hair I have remaining.

The div element containing the error message, called "error_msg" is large and z-index'd over the entire surface of the form. Here's a screenshot from firebug:
You can fix this by adding this to your .error_msg{} style declaration (around line 2484 from the way my firefox sees the output of /css/c/style/):
height: 30px

Related

Javascript Modal popup between themes on Wordpress site

I have an issue with a javascript modal not working between 2 themes on a Wordpress site.
I have a form that has a modal popup with a subform that allows you to submit multiple items to a list.
Here is a copy of the working example form. This is Wordpress theme Twenty Sixteen.
http://www.taftcollege.edu/web-tasks/nested-forms-test/
Pressing "Add Salad" appropriately shows the modal.
Here is the not working version on our custom theme.
http://www.taftcollege.edu/safety/modal-test/
Clicking "Add Salad" works in the first version of the form and not in the second.
There is a modal button at the bottom of the forms that works on both forms.
As far as I can tell there's no reason it shouldn't be working. But try as I might I am unable to diagnose the specific reason that it's not working. There's no error showing up in the console.
The author of the theme is unreachable and the author of Gravity Perks has refused to help me with this issue.

is it possible to prevent oracle apex from submitting a page until a user clicks on a refresh button on that page?

I have just started working with Oracle APEX and would like users to be able to download reports from my application.The problem is I have a number of reports which have a large number of rows. Each time a user clicks on a page tab, the page is resubmitted and the query for the reports are executed again. This results in a lot of delay and is becoming frustrating for the users!
Is it possible to stop APEX from resubmitting the page until the user clicks a refresh button or is it possible to stop the query for reports from executing everytime the user clicks on a page tab?
To prevent submitting you can change the page template. Open page properties, in the section Shared Components find Templates. Near the word Page you will see a link to its template. Follow this link, then find a section Standard Tab Attributes. In the field Current Tab you will see something like this:
<li>#TAB_LABEL##TAB_INLINE_EDIT#</li>
Change this value to:
<li><a class="active">#TAB_LABEL#</a>#TAB_INLINE_EDIT#</li>
After that an active item in a menu will be displayed as a static text, not as a link.
All pages with this page template will have this behavior. If you don't need to change behavior of all pages: before changing template make copy of it, change the copy and choose the new template in a page properties.
Have you tried with the conditions?? I pretty new with Apex too, I had a similar problem, what I did was put conditions to the buttoms and regions.
After that I good a nice result. Hope it helps you.
Good luck

Slidemenu won't load the first time in JQuery Mobile App

I have a Jquery Mobile app with a slidemenu in the global page, and it appears with the press of a button or a swipe on the screen, facebook style. My problem is that the first time the app loads, the menu never pops out, even if you press the button a thousand times. You have to refresh the page and then in works in all the pages of the app for the lifetime of the session. If you logout and enter again, you need to refresh.
You can see a example here: http://cic-team.no-ip.biz:9090/apex/f?p=112:2 User: Demo Passw: 1234abc
The menu it's in an "After Header" region as a "List: Menu" type with this custom template: http://i236.photobucket.com/albums/ff289/Best1989/template.png
The button has the following attributes:
data-slidemenu="#slidemenu" data-slideopen="false" style="margin-left:0px !important;"
Maybe the Javascript or the CSS are not loading correctly the first time, but inserting the menu in other region has not worked for me. I'll gladly read your suggestions and comments.
I'm using Apex 4.2.0.
Thanks in advance.
With some research I found the answer to my question, please check this:
http://www.gajotres.net/how-jquery-mobile-page-handling-affects-javascript-executions/
The problem was that I wasn't loading the menu classes at the Login page (which is the first of all) and when you actually got to the page where the button and menu is displayed, it didn't load the classes.
Solved the problem loading the components in the first page but keeping them hidden.

Logout of Github using javascript

I'm working on a chrome extension that will always have a current user who is logged in to GitHub. In order to switch users, I want to have a log out button in my extension that logs the current user out.
I've tried simply
chrome.windows.create({'url':'https://github.com/logout'})
Which takes me to the GitHub logout page but there is still a confirmation that the user would have to click on to successfully logout. I would like to be able to log the user out in the background or at a minimum, without them having to click on an additional confirmation.
Any thoughts?
You can check if one of the two techniques mentioned here works for you:
"How to automatically click a confirm box?": overriding the window.confirm function
"Auto Click for JavaScript confirm dialog": inserting dummy function showConfirm() at the top of the header of the Browser.Document which overwrites/suppress the original function showConfirm().
Even if the names of the methods differ in the Github confirmation page, the idea remains: if you can somehow override/silence the confirmation method, you can skip past that step.
Working Solution
When I called https://github.com/logout from an external page it showed a form with a submit/confirm button to logout. The form doesn't have an id or class but I managed to submit it using
document.getElementsByTagName('form')[1].submit();
Of course, this isn't ideal since it will break if github changes the layout of their logout page. Also, there is a delay between when the page is loaded and the form is submitted which isn't very user friendly. I'll update here if I find a better solution

JavaScript alert "the page says"

I have a form and I am using JavaScript to validate the form, so if we leave a field blank it will alert "Please Enter your Name".
If I go to the link directly, it works perfectly. But I am using an iFrame to embed it into other sites. When I embed it, and click Submit with an empty field it says:
The page at http://www.domain.com says: Please Enter your name
This is a security measure to prevent a framed site from displaying a message that appears to come from the parent site.
You cannot avoid it without avoiding the use of alert().
You could display the information to the user by modifying the DOM to display it as part of the page instead.

Categories