Want to forcely enable Pjax in IE9 in yii2 - yii2

Some here now, I am in such situation that I need to use Pjax for IE9 in yii2.As I already proceed with many Pjax forms ..reverting back to ajax is not a good option for me.. Anywhere can help me .. for this..

No, it doesn't work in IE < 10. So have to use jquery .ajax function and make a server request.

Related

Calling link in angular not working in chrome but works in ie

We are using xarios phone manager and in my angular app i use
var url="dialfrompm://phonenumberhere";
window.open(url,'_newtab');
This works in IE but in chrome it just doesn't do anything, does anyone have any idea why this may be?
This one works to my project
window.open(url,'_blank')
It might not work well when using Angular UI Router or ngRouter.
You can try to use $window.location.href.
You must first inject $window in your controller.

how to get previous page url when javascript is disabled?

How to get the previous URL when Javascript is disabled?
The page URL from where it is redirected?
The solution should be working fine in all browsers?
For a client side, imho there is only the JS solution.
var x = document.referrer;
But you can always use the PHP solution, if that is an option for you, the referer is part of the SERVER super array:
<?php echo $_SERVER['HTTP_REFERER']; ?>
Hope I could help.
I can only advise to look at $_SERVER["HTTP_REFERER"] in php.
But you should read about moments and specialties of using it.

HTML - What does data-remote="true" do?

I was just working on a project that was sending an extra request and it was because of data-remote="true". I've seen this line plenty of times before, but I guess I don't really know what it does. I tried Googling it but all that comes up are specific examples where data-remote isn't working for the question asker.
I just want to know what the purpose of data-remote="true"/"false" is to get a better understanding of it.
data-remote = "true" is used by the Ruby On Rails framework to submit the form/link/button as an ajax request. If you are interested here is the guide discussing how Ruby on Rails works with javascript: http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html
It is definitely not a standard thing.
Usually data-*** is a custom attribute used on application level. So check in sources of your scripts - it is used by some code.
I was told that data-remote="true" is an HTML version of JavaScript's preventDefault() method, in that it simply prevents the form from being submitted to the server.
Rails applications along with the jQuery gem generates the global listener:
$(document).on("click", "a[data-remote=true]", function(e){
e.preventDefault();
$.getScript($(this).href())
});
Feel free to correct me if I'm wrong :)

how do redirect values to other page without click event in html. Below code is fine IE. But Not in Mozila

I have implemented paypal in my web page. Process is 'given inputs are redirect to other page(2 nd page) which have to get that input and redirect to paypal page(third page). Here we submit data on first page. value pass to second page(in this page user interaction not allowed) after pass to third page.It works fine in IE . But Not In Mozila.Send any Solution.
Code sample(second page):
<%string product = Request.QueryString["productName"].ToString();%>
<% string amount = Request.QueryString["price"].ToString(); %>
">
">
document.all.frmpaypal.submit();
Fine in IE, Not In Mozila
document.getElementById("frmpaypal").submit();
document.all is an IE-only non-standard extension. You can use:
document.getElementById("frmpaypal").submit();
Which will work on both browsers. Better yet, use something like jQuery:
$("#frmpaypal").submit();
(This simple example doesn't really show you the power of jQuery, but you'll love it once you find out everything it can do!)
document.all is non-standard. Add an ID and use document.getElementById.
Have you checked into the possibility of sending values via GET instead of POST in the FORM's action attribute?

Winforms web browser control not firing document complete with AJAX web site

The VB.Net desktop app uses the IE browser control to navigate the web. When a normal page loads the document_complete event fires and I can read the resulting page and go from there. The issue I am having is that the page I am driving is written with AJAX, so the document complete event never fires. Furthermore, when you view the source of the page after it loaded a new portion via AJAX, it hasn't change. How are people handling this? What are my options?
This solution might solve your problem.
prerequists:
AxwebBrowser control,
reference to mshtml.dll
Dim axmshtml As mshtml.HTMLDocument = YourAxWebBrowserControl.Document
Dim HTMLSource As String = axmshtml.body.innerHTML 'html source, including DOM changes
If you know what you are looking for you can put the above code in a timer/loop
and simply monitor the page source for changes.
If wb is your webbrowser control, then instead of getting the HTML by using:
wb.DocumentText
use:
wb.Document.Body.InnerHtml
This will give you the updated html, reflecting the AJAX update.
As to detecting when the AJAX completes, for me it seems to be triggering a DocumentCompleted event. Not sure why it's different for you.
You need to interact with the Javascript code in the website using the methods on HtmlDocument.
I have seen this kind of behavior with C# when some AJAX scripts created a race condition. Adding the defer attribute to the script tag helped in that case. YMMV.
Not sure if this will work.
When the Ajax call completes, add a random anchor hash to the URL like so: foo.html#23234
then add your code to the NavigateComplete2 event.
http://msdn.microsoft.com/en-us/library/aa768334%28VS.85%29.aspx
I'm guessing that the page your load in your windows app does an AJAX call, which appears to refresh the page. In that case, the document_complete event isn't fired, because the webpage itself isn't refreshed, but a portion of the page.
I found a similar question about this problem, with an accepted answer in VB.Net.
You can use the ProgressChanged event, it seems to fire during ajax calls