Keep The Frame At The Bookmark In The Webpage?
Sep 23, 2010
I use the script below to adjust the size of the frame. It works nicely for me. The only problem is, the frame initially jumps to the bookmark, and then on the reload, jumps to the top of the page.
how to keep the frame at the bookmark in the web page, instead of jumping back up to the top??
<script>
<!--
function resize_iframe(){
if ( window.frames["MainWindow"].document.body.scrollHeight=0 )
[Code]....
View 1 Replies
ADVERTISEMENT
Mar 14, 2011
We have an html page which brings in content dynmically using Ajax. So the page starts out with certain content, and when a particular link is clicked, the content is swapped out with new content. With this approach, the back button on the browser does not work, because the URL didn't actually change. How could a user bookmark the new page with the second set of content? Is this even possible?
View 2 Replies
View Related
Aug 26, 2011
I have a domain: example.com; which is the parent.And a subdomain: api.example.com; which page 'receiver.html' is being loaded in an iframe, child of parent. Both pages set document.domain = example.com.
I'm trying to adapt this code:[url] but Idon't want to load jQuery from the <iframe> again but I need to have the method $.ajax() working from the <iframe> otherwise it would be a cross-domain request and the browser would abort it. I tried ingenuously to set via $('iframe')[0].contentWindow.$.ajax = $.ajax() and I just got a shortcut to the parent page jQuery method. I also tried to "clone" it using $.expand (true...) but the method doesn't work for me; probably because of the complexity of the objected I'm trying to clone. So is there a way for me to use jQuery to have only a $.ajax() method in the <iframe> ? I've thought even about creating a XHR in the child-iframe and then use that in the $.ajaxSetup ({xhr: THATNEWXHR}) but I couldn't do it. I mean, I want to use the XHR factory from jQuery (which has fallbacks for IE, etc) but it has to be created from the iframe-child.
Maybe there is other way to make the AJAX call come from the child-iframe.
If you're wondering "why don't you load jQuery from <script> in the child-iframe", there is a reason... As I'm using jQuery plugins + my own custom javascripts + other independent scripts I created a compiler which minifies each file and bundle them in one. The advantage of this is the reduction of HTTP requests. So "why don't you load that bundle inside the child-iframe?", because it's ugly and Twitter doesn't... Yeah, I like to take Twitter as a reference and I think if they were able to make it so can I;
I got to work in most browsers except IE and Operaby doing it with pure javascript.
I'm "attaching" the code for you guys to test. If you open it with Chrome, Safari or Firefox you will receive 2 alerts one with the return of $.get() and another with the return of a request made via XMLHttpsRequest object. Otherwise (if you open it with IE or Opera) you'll get 'undefined' in the first alert but the real return in the second.
This is the example.com/index.htm:
View 4 Replies
View Related
Oct 15, 2001
Im trying to make a back button that reloads the previous page the user was at.
The back button will be on a small top frame and the page that needs to be controlled will be in the main frame.
The top frame is just a navigation system, and all pages will be loaded in the main frame.
Im trying to use this Code:
<FORM>
<INPUT TYPE="button"
NAME="back"
VALUE="BACK"
onClick="history.go(-1)">
</FORM>
Does anyone know how I could accoplish the desired result using this code, or any other code? And what about a foreward button?
View 2 Replies
View Related
Apr 24, 2006
I have a servlet which accepts a url as a parameter and does something with it. I need to pass the parameter via POST.
I want to write a bookmarklet which takes the URL of the current page and invokes the servlet with that URL via POST.
I tried to achieve this in many ways. But no success.
View 1 Replies
View Related
Jul 20, 2010
I want to have a main image in place and when you click on 1 of the 3 frame options the frame changes showing a preview. Also I would like the add to cart button change its code to add the correct item as well.
View 2 Replies
View Related
Dec 2, 2002
I have ran into some sites that must have an AUTO bookmark feature. After I visited it added a bookmark automatically. It only worked in IE 5.5 Do you know a script to do this if so where can I find a way to stop it.
View 2 Replies
View Related
Nov 2, 2005
I load an Iframe within html page contained within another page and from the hosting page I would like to scroll to a given bookmark within the page loaded within the iframe without causing it to reload. How do I do this? I have tried:
function navIContent(bm)
{
IContent.src=bm
return
}
called by :
onclick='navIContent("../content.htm#test")'
but it doesn't seem to work!
View 3 Replies
View Related
Jun 14, 2006
At the top of www.cheatstomb.com there is a link to bookmark the page but it doesnt do anything when I press it. What I did wrong and how can I fix it?
View 2 Replies
View Related
Apr 24, 2007
I need a script to create a 'Bookmark this site' link. However I only found scripts that let you configure the URL that is bookmarked.
But I'd like to have one that just bookmarks the site on which the link is so I cna use the same script and link on different pages but the user could bookmark that exact page he is on.
View 2 Replies
View Related
Aug 30, 2010
i need to pass the data in the textfields from the left frame to the textfields in the right frame of my frameset. (ex: dslnum of frame1 will be pass to txtDSLTN of frame2)[URL]
View 19 Replies
View Related
May 22, 2011
I have two frames (frameset, let's call it frame1 and frame2). Frame1 has links..., and frame2. When some link in frame1 is clicked, it must be changed content of the frame2. Here's example: click. How to do that? (I don't see any javascript code)
View 2 Replies
View Related
Jul 19, 2006
I have a parent document that has a frameset with two frames in it. The first frame is a "header" that runs across the top of the site, and never changes. The second frame contains the "content" of the site. Essentially, I am trying to figure out how to prevent the header appearing above external sites when the user clicks an external link in the "content" frame.
Every time the content frame changes to a new URL, I would like the check that URL and determine if the content frame is changing to an external URL (i.e. different domain in URL) or to an internal link (same domain in URL). If the content is changing to an external link, I want to break out of the frame and just load that external link in the top most document.
I would like all of my javascript to be in the parent document, not spread throughout the individual pages of the site. I was trying to approach this by setting the onunload event handler of the content frame, but I am left with a couple of specific questions:
1. In handling an unload event, can you determine the next URL that the document is loading? Code:
View 6 Replies
View Related
Jan 10, 2011
I have a little problem, I structure my site with a main page index.html with a frame in the central whit name CENTRALE, so every other page I will open within this frame. Now I need to have a direct link to these internal pages, give an example I wish it were possible to go to the page clothing giving a direct link to that section of the site type www.indirizzo.com / clothing.html because the state of things if I take the 'direct address to that page I open only the part inside of the frame, but I wish I would open inside the "main frame, there is a solution in javascrip to overcome this problem?
View 4 Replies
View Related
Jul 23, 2011
I want to have a combobox with bookmark options. After you select a value from this combobox you can bookmark it with a push button. This should popup a bookmark dialog from the browser bookmark dialog.
Lets say we have 3 options in the value's. Google, Yahoo, Bing When you select Google and you push Place bookmark you should get a browser bookmark dialog with a title "Google search site". The url would be just [URL]
I also want Yahoo with the url [URL] and the bookmark title Search at Yahoo! and Bing with the url [URL] and the title Search at Bing
View 4 Replies
View Related
May 9, 2006
I have a javascript function for creating an 'add bookmark' link on my pages. For firefox it uses window.sidebar.addPanel to add the bookmark
function addBookmark(title, url) {
if (window.sidebar) { // firefox
window.sidebar.addPanel(title, url,"");
[code]....
View 4 Replies
View Related
May 19, 2011
I'm a total novice with scripts but I've managed to get halfway with something. I want to create a bookmark that grabs the current url and adds the date to the url in the format: [URL] I've got so far: javascript:location.href=(location.href)+'/nocache='; But I can't work out how to add the date to the end, is it possible?
View 1 Replies
View Related
Mar 30, 2001
Does anyone know how sites (e.g. Sitepoint) show up with a smal iconn next to their name inmy Favourites menu (in IE)?
I'd like to do that for my site but am unsure how to go about it.
View 3 Replies
View Related
Aug 13, 2005
I want to add a link to my site's homepage where viewers can click on a link to automatically "add to favorites" or "bookmark" the page.
Does anyone know anything about this?
View 12 Replies
View Related
Aug 10, 2010
It launches in IE and give the user instructions, then at the click of a button, launches my setup.exe. I want my webpage to launch setup.exe then go to another webpage on my CD, congratulations.html, which says "installation is complete etc". Here's what I am trying to do through JAvascript. It doesn't work. Should the first instruction be flushed in order for the 2nd one to work?
[Code]...
View 7 Replies
View Related
Nov 23, 2011
I want to use the values of text boxes on my HTML webpage to create a webpage URL (like below):
<script type="text/javascript">
My text boxes are as follows:
Now this all works and the result webpage URL prints to id='ID1', but the big question is how do I use this resulting URL in another Javascript section as the src="?
For example:
View 14 Replies
View Related
Jun 1, 2009
I have a site where I'm using a home-grown social bookmarking tool. The user has an option to "Bookmark this page" to their browser.
My code works, but the problem is that when I dynamically grab the document.title, the browser (both IE and FF) tries to resolve any spaces or special characters so that when the favorite is stored in the browser, the bookmark reads:
"This%20Site%20Bookmark"
instead of:
"This Site Bookmark"
I feel like there must be a simple function to resolve spaces, but I'm coming up blank, no pun intended...:)
View 3 Replies
View Related
Sep 22, 2009
The code is just a blue table with a bookmark option. When I remove the javascript code for the bookmark the blue table disappears.
<html>
<body>
<table width="95%" align="center" cellpadding="0" cellspacing="0" bgcolor="#3399ff">
<tr bgcolor="#3399ff">
[Code]....
This is the code exactly how it was sent. I am trying to remove the bookmark option but keep the table the way it is.
View 5 Replies
View Related
Mar 5, 2011
I am trying to display a webpage from another domain and tried to access its elements and I am facing issues with this.
I tried using "iframes" and am facing cross domain issues.
All that I want to do is, set and get the attributes of the elements of the webpage from the other domain (eg: set text field value, get dropdown box values, click button etc)
Is there a way to get this job done?
I thought of browser addons however it will be a browser specific solution.
View 14 Replies
View Related
Feb 28, 2011
I've got links on a website that takes the user to different parts of the same page (i.e, no reloading of the page)
I would like 2 things to happen when a link is clicked:
1) the url changes eg. from mysite.com/home to mysite.com/about when the about link is clicked.
2) when refreshing the page that it stays where it's at and not go back to the top of the page.
View 4 Replies
View Related
May 21, 2011
I need to make a script when it is clicked in bookmark it must immediately mark all the pictures on the page with border css. Code for bookmark:
Code:
Inside mark_img.js I loading jQuery to current page and also immediately mark all images with css:
Code:
When I click on the bookmark I don't see any changes. And console show me:
Code:
But if I click again on the bookmark it will be work fine and draw border for all images what I need.
Question: how to set css for images with the first click on the bookmark?
View 3 Replies
View Related