Recaptcha missing if wrong captcha input, jquery mobile, asp - asp-classic

I have an ASP mobile site and I am using jQuery mobile. I have problem using recaptcha on my contact page. it disappears when the captcha is wrong. It works fine when i am not using jQuery mobile. Any help pls? i am using jQuery validate plugin too.
Thanks

I was experiencing a similar issue - my team used jQuery mobile's ajax page linking to navigate to our sign-in page which used reCaptcha. The ajax call would cause the page to load, at which point the reCaptcha form would render and hide all other content. Refreshing the page would load everything properly.
My fix to this was to remove the ajax linking to the page. From the jQUery mobile manual:
Linking without Ajax Links that point to other domains or that have
rel="external", data-ajax="false" or target attributes will not be
loaded with Ajax. Instead, these links will cause a full page refresh
with no animated transition. Both attributes (rel="external" and
data-ajax="false") have the same effect, but a different semantic
meaning: rel="external" should be used when linking to another site or
domain, while data-ajax="false" is useful for simply opting a page
within your domain from being loaded via Ajax. Because of security
restrictions, the framework always opts links to external domains out
of the Ajax behavior.
In version 1.1, we've added support for using data-ajax="false" on a
parent container which allows you to excluded a large number of links
from the Ajax navigation system. This avoids the need to add this
attribute to every link in a container.
Note: When building a jQuery Mobile application where the Ajax
navigation system is disabled globally or frequently disabled on
individual links, we recommend disabling the $.mobile.pushStateEnabled
global configuration option to avoid inconsistent navigation behavior
in some browsers.
This fixed our loading issue, but now we experience another issue: when navigating from the sign-up page back to our landing page, and back to the sign-up page jQuery mobile causes the browser to reload the landing page. Still working on fixing this.
Edit:
After thoroughly reviewing my code I noticed that the page I was calling had html, head and body tags, pulled jquery.mobile-1.0.min.js and jquery-1.6.4.min.js twice, and was included in a template.
Once I removed the extra html, head and body tags (as well as the js includes), the page displayed properly.

Related

Single-Page Website with Ajax NAvigation

I am planing a simple website layout: Header with navigation, sidebar and a content block.
The whole site should be a single-page application because I am using a Cesium Visualization and a page reload would delete the current JS objects that are displayed in the Viewer.
Therefore I would like to reload the content container using AJAX to display my different "pages" and therefore keep all the JS Objects in the browser.
My question is:
Do you know a way to add a url-based navigation to this architecture?
For example: I am on the index page /index/ and enter the new url /content1/. The new url reloads the content container using AJAX and keeps the rest as it is. Therefore I would also be able to use the forward and backwards buttons of the browser.
May this be possible with ASP.net MVC routing?
I am pretty new to this so I hope I discribed my problem well enough.
Thanks a lot!
Try Pjax which uses ajax to load content dynamically via ajax
and pushState to maintain url history i.e is a HTML5 api. You shall find more details in the link below
https://github.com/defunkt/jquery-pjax
If you are familiar with angularjs then using ngRoute is a better alternative to Pjax as it has an effective url management through the routing service, please check the below link for more details on ngRoute
https://docs.angularjs.org/api/ngRoute/service/$route

Adding Custom Popups using google tag manager

When a user lands on a page, I want to show a custom HTML popup. I have Google Tag Manager integrated with the website.
Can this HTML Popup be shown using Google Tag Manager? (script and code to be inserted using Google Tag Manager)
Is it frowned upon / not advised to use google tag manager for
anything apart from tracking?
1.) Yes - GTM is pure Javascript, and inserts Javascript into the page code, so anything you can do you can do via GTM. There are some minor caveats (e.g. a size restriction on custom HTML tags), but doing a popup should work just fine.
2.) There are certain use cases that are discouraged - Google recommends against (or at least used to) making visible changes to the page markup via GTM. The problems with that are that GTM is loaded asynchronously, so you would not know at which point the changes show up and you might get "flickering" pages, and a possible performance impact when you force the page to re-render.
Nothing of this applies to popups, so you should be fine (although using popups these days might have its own problems, but these are not related to GTM).
Personally I would recommend against implementing popups via GTM if the popup is an integral part of your page; splitting up an application between page code and GTM code will sooner or later confuse a developer. But if this is just advertising or a call to action or something similar then (IMO) using GTM is not a problem at all.

Meteor - how to change page title with route/page changes, NOT using JS

I'm building a site with Meteor, and it has to be SEO-friendly. This means that page titles must all reflect the content. When the user navigates to different pages, I need the page title to change, but it has to be served up from the back-end, not changed via Javascript, as spiders won't pick up on that.
How would I do this?
You can render templates into HTML pages on the server side using Arunoda's SSR package - https://atmospherejs.com/meteorhacks/ssr

how can i remove the social bookmark plugin using html or javascript

sory guys, click the first link you will see the image i been mark by red, after you click the second link, you will see the arrow.
1) http://s261.beta.photobucket.com/user/minaekoz/media/satu.png.html
2) http://s261.beta.photobucket.com/user/minaekoz/media/satua.png.html
Question :
That is social bookmarking site i use to promote my blog but i want to remove the plugin after somebody click that link in the first image.
how can i remove that plugin in the second image after user click the link at the first image?
*sory if my english so bad
I'm not sure how your page is embedded, I guess it's done using frames or an iframe? This would be important to know, but you'll most likely be able to use some javascript code like this (called in some element's onload event (e.g. <body>):
if (window.top != window.self)
window.top.location.replace(window.self.location.href);
I think you can add it through using a custom BlogSpot template or maybe with some of the widgets as well.
Probably you can't. That social bookmarking site will probably open your website in an IFRAME, and therefore, clicks in your page cause IFRAME navigation, and not browser navigation.
Since your site, and the IFRAME site are different, the javascript in your site cannot access the DOM (Document Object Model) in the other site because SOP (Same Origin Policy).
You can disallow that your website run in IFRAMEs by using the X-Frame-Options http header though, but I would leave it like that.
Cheers.

Facebook Page Load Concept

I know the page reload concept via ajax without page refresh.
But facebook pages reload through normal page load. but sidebar's not loading just reload content area.
How is it possible?
Advance Thanks friends
Facebook uses bigpipe
The general idea is to decompose web pages into small chunks called pagelets, and pipeline them through several execution stages inside web servers and browsers. It is implemented entirely in PHP and JavaScript.
Clicking and taking some action on a webpage initialize/executes a pagelet, response generates from iframe or from ajax as well. Read the response and show it to a small chunk, this will not refresh the page.
I believe they are using the new history.pushState functionality in HTML5.

Resources