Triggering Functions On Page A From Page B?
Sep 27, 2009
Page "A" has a function that pops up Page "B". When something is done on Page "B", I'd like Page "A" to reload.
Very much like here at DevShed when you click in the "Rep" button, a small pop-up opens, and when you finish giving whomever maximum positive rep, the original page reloads.
View 6 Replies
ADVERTISEMENT
Jun 9, 2010
I am working on a page that will load in other pages using AJAX and the .html method. Something like this :
<span id = "edit">Edit</span>
<div id = "cont">
</div>
//the click edit script
[Code]....
Unfortunately this does not seem to work, entirely. It does trigger the click event but it messes up the post for some reason. I have played around with it for the last 45 minutes or so and it seems like the click event trigger is what is messing things up, if I comment it out it works fine. Could anyone tell me why they think this is? note this is an over simplified version of my actual code, but the structure is the same.
View 2 Replies
View Related
Aug 23, 2010
I have some simple code to make a link open on page load. When the code fires it shows the alert 'clicked' but then nothing happens. The url is generated with APEX and if i click the link on the page physically the alert fires and the page redirects to the linked Url. Why isn't the click event working?
jQuery:
$(document).ready(function(){
$('.myLink').click();
});[code]....
View 2 Replies
View Related
Mar 1, 2010
Currently I'm using this code:
$(document).ready(function(){
//when a link inside our thumbba div is clicked
$('#thumbb a').click(function(event){
//prevent the default behavior(going to the page)
[Code]....
to swap out content from a hidden div (swap-b) into the visible div (swap-a) - this works great, however, I have 12 of these "hidden" divs on the page, and I want each one to behave independently. Currently, when I click the swap button for one div, it activates all the others. I get that this is because all the divs have the same IDs, and that the function is telling all the divs to behave the same, however, I don't see how I'm supposed to apply this function to each div independently. I've tried using a "this" function to make it work, however that just breaks the function.
View 12 Replies
View Related
Feb 3, 2011
why would my hide() call reset the entire page? the code is the mode basic:
Code:
$("#text").bind("click", function() {
$("#productContainer").hide(); //hides the containers });
it hides the div for few seconds and then the entire page reloads
View 12 Replies
View Related
Apr 29, 2011
Im having some troubles with some functions i launch in $(document).ready() to initialize the page. Then if i click on browser refresh everything goes fine... even more strange when i place alerts between then calls to these functions everything goes fine too... but the first time the page is loaded it seems that the functions are not executed at all.
View 3 Replies
View Related
Feb 16, 2009
I am loading a page dynamically using .load with jquery and then i have another button on that page that allows you to go back to the previous page using livequery click function. However, when I go back to the original page, none of the page functions defined previously are working anymore! Is there a way to force the browser to reinitialize the script? How does one get around this problem with jquery?
View 2 Replies
View Related
May 28, 2010
I'm having trouble calling javascript functions that are loaded in the main window.
Here's what happens:
- when a link is clicked on my page, the contents of a div are reloaded with new contents from another file.
- The new file only contains the new contents of the div.
- I want the new contents of the div to call a function that was originally loaded before the new contents were reloaded.
- So, the main page loads the information and the javascript functions. Then, when the link is clicked, the new contents are loaded into the div with a link that calls a function that was already loaded.
- However, nothing happens when I click on the link to call the function.
Is there something I need to do to call the function?
View 1 Replies
View Related
Jan 21, 2010
I have a nproblem with running commands from a loaded page;[code]Now i want to execute the alert() on page BB.html when doing the load on page AA.html.
View 2 Replies
View Related
Jan 30, 2011
I'm writing this web app.For each view, when required, I'll have one or more script files named after the view. Some functions are shared across the site. So I extracted and put them into separate .js files. Some views may have sub-views (such as the login box).
And I ended up with 10 <script> tags per page (includes 3 jquery must-haves). Although in some pages I can lower it to 6, I still think this is a pretty big number, as lots of extra HTTP transaction is required when loading the page.
I put the <script> tags at the end of the page, before closing <body>. Most scripts didn't use $(document).ready().
So is it bad to have 10 <script> tags on each page? Is there a magic number I should never surpass? Is it a good idea to put lots of (unrelated) functions into a single .js?
And is it bad to have scripts executing at the end of the page rather than $(document).ready ?
View 2 Replies
View Related
Dec 29, 2009
I am writing a form that grows using ajax server responses to info as the form is filled in and everything is fine in standards compliant browsers but IE is having a problem. I have two js functions on the page that collect form data, send it to the server, and then write the server response as innerHTML to specified divs on the page. This works great in FF but in IE it runs the first function but fails on the second function and the two functions are identical except for the server routine.
The div that is populated with the server response so it doesn't seem to be a problem with the coding because if one works, and they are identical, the other should work too so perhaps IE is choking with the way it is handling two ajax objects on the same page? You will need to add something to the shopping cart first at [uRL] and proceed to checkout, then on the checkout page look in the url and change ste_chkout_proc to ste_checkout_proc and load the new url to see the dev checkout vs. the live checkout.
View 2 Replies
View Related
Jan 8, 2009
I have a single javascript file that contains all of my javascript functions. Each of the these functions are particular to different pages on my entire site. How can I create logic that will only allow those functions to work when certain elements or identifiers are present on a page?
View 9 Replies
View Related
Nov 18, 2010
I download the jquery library, when i include it as such:
It loads but i always get some sort of error in the functions in the page or something...as if the js is loaded but not correctly or as if it's missing, even though the download itself is correct
If i change the include path to (which is the exact same file i downloaded):
Everything works fine i am thinking maybe it could be something that has to do with encoding maybe? am not sure...any clue? it's only happening with the jquery JS files, the rest are working fine.
View 9 Replies
View Related
Jul 26, 2010
I have a page that inserts a div after another div on my page. Basically this div and its content are generated by the server and outputted via Ajax when the user clicks a button.I have something like:
//Listener function
$("div").click( function () {
alert("thing");
});
Clicking any of the divs that were loaded on the page will give this alert however, clicking on this div that was inserted after the user clicks a button does not respond to this listener. I put my rendered html into the w3c validator and my page has no errors (because I thought that maybe I had a missing end tag which would cause jquery to not work).
View 1 Replies
View Related
Feb 1, 2011
[Code]...
when i load page it does nothing only blank page, may have code in wrong place but not sure so can someone show me a working example so i can find out what i'm doing wrong also i would like the part of page to refresh evey 120 seconds is this possibe with jquery?
View 7 Replies
View Related
Apr 14, 2009
I'm creating an AJAX page that is built using a PHP Class, ie the php looks a bit like this: PHP Code:
$wp_page->addjs('../var/savepolicies.js')
$wp_parser->page = "userpolicywindow.php";
$wp_parser->addlink("Home","../index.php","");
$wp_parser->addlink("Logout","javascript:logout();","");
$wp_parser->getpageid("501");
[Code]...
within this page that has been created, there is an AJAX tree folder which calls another page to be loaded into a DIV by AJAX again. Code:
[Code]...
I don't know why it doesn't work because the page has been loaded with the JS file, but as soon as the link is added afterwards it doesn't work. I take it this is because it doesn't know where to find the JS, but how can I overcome this?
View 4 Replies
View Related
Mar 28, 2010
I have a frameset like:Quote:
<frameset rows="100,*,80" border="none">
<frame src="header.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
[code]....
View 14 Replies
View Related
Aug 19, 2009
I loaded page in div , usign jquery ajax
But the page which i loaded containg this code:
HTML Code:
To refresh all page index.php to redirect it to home.php
But the problem this, it's don't refresh all page which contain the div , but it's refreshed oly in the div wuch i loaded this code in it
So i want after i load this code in index.php div , then refres all page to redirect itto home.php
View 1 Replies
View Related
Sep 24, 2009
I've got 2 pages: a current events page and a past events page the current events page loads fine as there is only about 10 events the past events page takes about 30 seconds to load and will crash if u click your mouse in the loading time.
The pages are near identical the only difference is the query that selects the events (> versus <)
The page loads immediately without:
But when i put it back in the above happens. I'm using jQuery.roundedcorners.
View 1 Replies
View Related
May 10, 2010
I am using a Jquery/PHP/MySQL login script which is supposed to display an error or success message when the user enters their username/password and also if the username/pw is successfull go to a secure page. Right now as I have it coded, this isn't working properly. Basically nothing is displayed either way.Also,wasn't sure if I just needed to replace, the ?secure-page part with the file name of the page I want to go to if successful?Here is the code as I have it now.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>[code].....
View 1 Replies
View Related
May 19, 2011
I'm trying to use the cookie plugin to remember the state of a navigation menu from page to page. Here is the snippet of code from towards the top of my page where I am including the jquery files and cookie plugin. The second part of the sample tries to determine whether the cookie exists.
[Code]....
View 1 Replies
View Related
Nov 4, 2010
On my webpage, I dynamically create an iFrame when a button is pressed, then load a html page from within my own domain into the iframe, based on what html page is loaded into a variable. My question is, can I dynamically change the font family of the loaded html page from the javascript of the main page? My code to create the iframe is:
function setSubTxt(){
var par = document.getElementById('parentDiv');
par.innerHTML = '<iframe src="'+subTxt+'" style="width: 375px; position: fixed; height: 365px; left: 400px; top: 145px; border=none;" name="subIframe" frameBorder=0></iframe>';
frames['subIframe'].window.location=subTxt;
document.subIframe.document.body.style.fontFamily = "Arial";
[Code]....
the variable "subTxt" has the url of the html page to be loaded (always on the same domain). The code: document.subIframe.document.body.style.fontFamily = "Arial"; was my attempt to dynamically change the font, but it didn't work. Also, it should be noted that there is no font family set in the html pages which would override this.
View 6 Replies
View Related
Jan 10, 2011
I have an webbpage, and in the middle of it there is an iframe to a php site. So i have used this code, so after some seconds the iframe will send the guest to another page. <meta http-equiv="refresh" traget="_top" content="5 url=http://mypage.com"/> But the thing is that i want the WHOLE page to reload, and go to that page after 5 seconds (we can say). With that code, only the iframe are going to another page. Is it possible to make the whole page send the user after some seconds, to another page and not only the iframe?
View 1 Replies
View Related
Mar 29, 2011
It is possible to perform a find in page search that looks at a specific link, opens the page in a new window and finds the text within that document?? Basically I regularly use an html page in work that has a list of people and their telephone numbers. I want to be able to type in a searchbox on my main page and it open the target page and find the name I am looking for? Is this possible or can you only Find In Page on the same page or another frame?
View 1 Replies
View Related
Apr 12, 2011
I have the following bit of jQuery:
Code:
$("#save_photos_all_continue").click(function() {
event.preventDefault();
var $black_white_all = $("#black_white_all").is(':checked');
var $color_all = $("#color_all").is(':checked');
var $other_all = $("#other_all").is(':checked');
[Code]...
In Google Chrome it works fine but in Mozilla/5.0 it actually goes to the save_edits page instead of just using the post and staying on the original page.
View 2 Replies
View Related
Jul 20, 2005
I have an html page that uses javascript to open a new window and
display a file that gets created when a button is pressed.
My problem is when the file is changed and the display button is
pressed, the old file is still displaying. I have tried using
<META HTTP-EQUIV=expires CONTENT=0><META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE>, but doesn't work 100% of the time.
View 1 Replies
View Related