How to use an external jsp file as a overlay - javascript

I have to popup an external jsp page as a popup when i click on hyperlink. And also I have to submit this page after performing some field validation. It is possible while using iframe. But it takes time to load the page.
For example I have one link registerNow, after click on this link I have to show registration page as a overlay. And then after performing some field validations I have to submit the page. At that time the url of the application should not changed.

Use any modal popup scripts.
You may consider any of this
1) jQuery UI dialog ( http://jqueryui.com/demos/dialog/ )
2) jqModal ( http://dev.iceburg.net/jquery/jqModal/)
2) Fancybox
and a lot more...

I follow the below link to achieve my requirement http://jquerytools.org/demos/overlay/external.html

Related

Click a link and stay on the same page

I am trying to navigate to another HTML file without changing pages. Basically I got an emergency button, and once clicked, it should open an HTML file which pops up a box displaying 3 other buttons. This box also has an "X" to close the window, to close this HTML file and go back to the other.
Basically I want 2 html files to display at the same time. I am currently using adobe edge animate to do the process, however I am capable to use Javascript and HTML.
To give you an idea: It is similar to when visiting a website and a box pops up asking you if you want to subscribe to the news letter, or just keep searching.
Thanks
Well. what i understand of your question. You want an html page on an html page. I suggest you could use JQuery popup screen. Visit this link. https://jqueryui.com/dialog/
If you want to call another html page without refreshing your page use Jquery .load(). http://api.jquery.com/load/
$( "#div_to_load_file_in" ).load( "path/to/your/file.html" );

After clicking a link, open new URL and automatically *click* on tab link inside that page

Is it possible to implement this behavior:
I have a HTML link on one page, and after a user clicks on it, it goes to another page which has several tabs on it. Upon clicking on one of those tabs, it triggers an AJAX post call which populates and displays content for that tab.
I would like that when a user clicks a link on the previous page, it takes him to another page and automatically clicks a specific tab so it triggers an ajax call which displays the content for that tab.
This site is a Wordpress site, if that information helps at all.
On the 'from' page you can have links such as
Click Me
You can set an onpage load function to load and use a trigger like this
if(window.location.hash === "#customHash"){
//my custom tab loader
}
You can use jQuery Cookie plugin to achieve this. http://plugins.jquery.com/cookie/
You just set the cookie on the first page, when the user clicks on the link
$.cookie('the_cookie', 'the_value');
And on the next page use the jQuery on load function to check for the cookie.

jQuery AJAX back button after changing html

I know there are many questions about jQuery + Back button issues, but it seems that they're trying to maintain history features when clicking the browser back/forward buttons.
My question is that when clicking the back/forward button, how can I load ajax-affected html page?
For example,
In index.html, dynamically remove all "div" elements from the list using AJAX (jQuery.post()).
Press the browser back(or forward) button to go to newpage.html.
Press the browser forward(or back) button to go to index.html again.
PROBLEM: the html page contains the deleted "div" elements.
How should I load index.html with no "div" elements after step (3)?
I'm currently using jQuery and Django as backend.
Thanks!
Use the jQuery history plugin to encode the application state. See their Demos page for examples of how to do what you want.

How to call div content in widows.open()

Actually i have a asp:LinkButton in aspx page and i just want that whenever user clicks on asp:LinkButton open popup on dat asp:LinkButton its already done and i have given another link to it(its ur website's link only) and its working fine,
but the problem is now i want to open a popup with checkboxes with the cities name.
i have made one type of you can say block in a DIV on the same aspx page in the bottom and now i want is to call this div content in the script above in windows.open..
Please help me out ..
asap
Thank You!
You can't show only piece of the current page using the window.open function - only the whole page.
Use ModulPopup from the AjaxControlToolkit or Dialog from the jQuery-UI or some similar functionality.
Or you can create new page that will contain only div with cities names checkboxes and open it via the window.open function

solution for popup page as modal

I was using window.showModalDialog() but doesn't work on all browsers.
People recommends me jquery, thickbox and also this contact Example
but the problem is when i submit the page, server will send me another page, and that page will replace my original page!
so actually it doesn't fulfill my requirement.
My requirement is on button click modal page should open and it can redirect to other page on same window without disturbing my original page and when I close My original page get reflections.
So is it possible?
Sounds like you need a simple html target="_blank" in the link to the other page.
http://www.htmlcodetutorial.com/linking/_A_TARGET_95y98y108y97y110y107y.html

Categories