Called Sub-page Immediately Returns To Calling Page?
Feb 4, 2010
I have been a mainframe programmer for over 20 years - I have a new project that requires browser pages written in JavaScript. I currently begin with a HTML page that assigns the values retrieved from a third party vendor's API to an array. I pass this array to another page to build a table full of links - when a client clicks on one of the links, two variables are put into yet another array and a third page is called, successfully passing the required data. Ultimately page 1 and page 3 will be .asp pages so that additional third party vendor API's can be called. The problem is this: after the third page is called from the second page, it displays for a second and then returns to the second page. When I click back I can see the third page, followed by the second page, and finally the first page. My question is this: why is the third page not displaying in the browser? I'm sorry if I have not posted this correctly as I really am a mainframe programmer and this is my first time doing anything code related with web pages
View 8 Replies
ADVERTISEMENT
Aug 17, 2009
I wrote a script to construct chords to make writing music easier for me. The script works, it shows there are no errors, and it does what I want it to do, but the page keeps refreshing almost immediately after the Alert box goes away. I have no idea whats going on. I don't know if it's the JS or the HTML part of the page.
<head>
<script>
function calc()
{
var type, note, root, third, fifth, seven, ans;
var notess, notesb;
[Code]...
View 2 Replies
View Related
Feb 18, 2011
I have written code that looks like this. The code works great for about a split second and then the page refreshes itself and I am back to square one. How can I prevent the page from refreshing itself and wiping out my jQuery changes. The page I am working on is located here [URL]
[code]
<script type="text/javascript" src="jquery-1.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
[Code].....
View 4 Replies
View Related
Jun 12, 2009
In my application I've the small line:
THis is very nice effect and more easy to use than the CSS method. I'll use this for some hover states.
Problem is that the opacity starts when the page is loaded. So you see the images 'flash' from normal to 'opacity: 25'.
Is there a method so the images have the opacity value immediatly, instead of when the page is loaded? Like a step before 'document.ready'. Or is the only way, the CSS way?
View 2 Replies
View Related
Sep 21, 2011
show images after people scroll down the page - don't load them immediately after the page is loaded.also the images which are below the scroll should be first loaded when an user scrolls down.i need a javascript for that, but i don't want jquery! the code should be as short as possible.
View 2 Replies
View Related
Oct 18, 2010
I'm working on hiding all of a page's content immediately via Javascript. I want to avoid using CSS to display none just incase I run into users who don't have JS enabled.
I wanted to get advice from others and see what the difference is between using jQuery actions within $(window) or $(document).ready. From what I understand, $(window).bind("load, function(){ etc. will only use the script once all contents on the page are loaded, including images?
And $(document).ready(function(), etc just requires the DOM to be ready but will still execute code even if images, etc. aren't loaded.
View 1 Replies
View Related
Dec 13, 2005
I am working on a web application and have run into a problem. From a
main window (Window1) I open a child window (Window2), and from that
child window I open a grandchild window (Window3). I need to call a
funcion that resides on Window1 from Window3. I do this successfully
by calling a function with window.opener on Window3, which calls a
function with window.opener on Window2, which calls a function on
Window1.
My problem comes in with the case of a user closing Window2, and trying
to carry out the function on Window3 that calls the function on Window
1. I have already tried window.top, but it doesnt seem to work.
window.opener of course returns the error "window.opener has no
properties".
View 2 Replies
View Related
May 12, 2011
I have a single webpage that contains information on all 50 U.S. states. There are 50 links at the top to jump down to the state you want, and at the bottom of the information for each state a Back to Top link.
I'm making the Back to Top link into something more complex, and it will require three or four lines of code.
So that I don't have to repeat the code 50 times, and create a burden when I need to edit it, I want to place it in a .js file and call it x. Then below the information for each state I'll simply have:
Does calling code from a .js file 50 times slow down the page load? Which method would load faster?
View 3 Replies
View Related
Mar 2, 2009
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><TITLE>Untitled</TITLE>
<META content="Evrsoft First Page" name=GENERATOR></HEAD>
[code]....
View 4 Replies
View Related
Feb 15, 2012
my $.post code returns a whole page i want to get only content inside a id from that . this is my code it alerts null.what's wrong with it..?
$(document).ready(function(){
var url_select_file = "index.php";
$.post(url_select_file, { component: "tinymce_details", action: "selecticondata" },
[code]....
View 9 Replies
View Related
Nov 3, 2010
How to add a hyperlink to an image that is being called into the page with this html below:
Anyone know or could steer me to the solution? I've tried to use the selector gadget, but it cannot find a good selector for this image.
View 3 Replies
View Related
Nov 21, 2009
I am using formmail and JS to collect booking info calculates a total and sends to email. Formmail redirects to a thankyou page. Here I can send the total to paypal. I have looked and looked, but cant work out how to pass the total from the booking form to the thankyou page.
View 2 Replies
View Related
Jan 30, 2010
like theres two pages.page one calls page two and displays the output of page 2 on page 1 via ajax.now can i click on page 2's output(on page one) and have it execute another javascript function to call AJAX(a third page)
View 1 Replies
View Related
Jun 21, 2011
I am using a form validation class I got from the internet. Now I have a main page wherein I have a <div id="form"></div> that, using AJAX, displays other pages with forms like textboxes, etc. for a user to input. Here is the code for my main page:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code]...
View 2 Replies
View Related
Mar 31, 2010
I'm sending some information to a php file using jQuery.Ajax.In the meantime i add a button to the page called delete_0 for the first element, delete_1 for the second, ....The php generates a unique ID and I need it back in the JSTherefore i tried to let the php run a js function in the end:
addItemToQueue ( ID );
function addItemToQueue(ID){
jQuery("#delete_" +
[code]....
View 2 Replies
View Related
Jun 29, 2010
If you call the below code, it will incorrectly print "true, false" when it should be "true, true". WHy is that? How do I fix this?
Code: isCapitalLetter = /[A-Z]/g;
//Incorrectly alerts "true,true"
alert( isCapitalLetter.test( "lineHeight" ) + "," + isCapitalLetter.test( "lineHeight" ) );
View 3 Replies
View Related
Jan 24, 2006
i have an html page that when it loads theres an onLoad event called which calls a function.now what i want to do is be able to click a link that refreshes the page but at the time on the refresh it skips the onLoad event. is this possible?
View 5 Replies
View Related
Oct 3, 2011
I can't seem to get the syntax correct to get this to work. I'm sure it is something simple.I want to call multiple functions inside my document.ready function.The first function gets called but not the second.
$(document).ready(
function GetSuspectCollection() {
$.ajax({[code].....
View 2 Replies
View Related
May 15, 2011
I've got a list in which each item has a link that shows and hides a div, and also changes text of the the link. I want to write the code like this:
$(".log a").click(function() { $("#panel-" + $(this).data("build_id") + ":hidden").trigger('showLog'); $("#panel-" + $(this).data("build_id") + ":visible").trigger('hideLog'); return false; });
... but that doesn't work. It seems as though if the first selector returns no elements that the 2nd line is not executed. I might be wrong about the diagnosis, but the symptom is that I can show the log, but can't then hide it, whereas if I start with all the panels visible and remove the first selector, the hideLog event is triggered as expected.What does work is this:
$(".log a").click(function() { var panel = $("#panel-" + $(this).data("build_id")); if (panel.css("display") == 'none') { panel.trigger('showLog'); } else { panel.trigger('hideLog'); } return false; });
[code]....
View 7 Replies
View Related
Jul 20, 2005
i do not know much javascript, but i am trying to call several different
scripts from the same web page and it is not working. Is there something i
can do or is this not a thing that is do-able?
View 3 Replies
View Related
Sep 21, 2010
I've got an IFRAME it loads a page with variable contents. I need to know the WIDTH of the body of that page. I'm using offsetWidth and offsetHeight
Quote:
This is weird....offsetHeight returns the height of the document body. offsetWidth returns the width of the iframe!
View 2 Replies
View Related
Jul 23, 2005
I'm trying to do something simple: find out which page had the link
which got me to the current page. I am using window.referrer, in IE6,
but it never has anything but blank in it. The scenario is that the
user must go though a sign on page to get to the goodies. If they go
direct, they get bumped to login:
if (window.referrer != "login_page" { window.location.href =
"login_page" }
But the referrer is no present. I've also tried looking at
window.history but to no avail. Are these all netscape specific and if
so, what is an IE equivalent?
View 1 Replies
View Related
Feb 17, 2006
I have an iframe inside of a parent page. How do I call the onChange
function in the parent page from the ddlProfileNames dropdown in the
iframe page?
Thanks.
code in parent page:
View 1 Replies
View Related
Aug 2, 2011
I have an ASP.Net 2.5 application and I need to call a javascript function when one of the pages loads initially. I've tried:
Code:
string ScriptToCall = @"EnableCheckboxes(" + cblDetails.ClientID + ", false);";
ClientScript.RegisterStartupScript(this.GetType(), "addScript", ScriptToCall, true);
where EnableCheckboxes is a javascript function on the page. This doesn't work (doesn't disable the CheckBoxList), although the EnableCheckboxes function DOES work when I call it in other ways, so I'm sure that the problem is that I'm not calling it properly on page load.
I've tried:
Code:
ClientScript.RegisterStartupScript(this.GetType(), "addScript", "alert('Hello');", true);
which DOES work, so I know I'm on the right track, but how do I do this?
View 4 Replies
View Related
Mar 10, 2010
ring how could I call a function on a separate page from another page; I know if you want to call a function you write something like this:
<a href="javascript:myFunc()" target="my_frame">Click Me!</a>
But what I wanted to do is, says I have two pages: page1.html and page2.html, and in page2.html I have a few JS functions namely myFunc1(), myFunc()2 and myFunc3(). Then I am inserting a few links in page1.html with an iframe below all the links with the name="my_frame", and what I want to do now is for the 3 <a> links I want to open up page2.html into the iframe (e.g. <a href="page2.html" target="my_frame">open Func 1</a>) but also when the page is loaded, one of those 3 functions would be invoked correspondingly depending on which link on page1.html I clicked.
View 3 Replies
View Related
Dec 12, 2009
I have to call the script below from my html page. How would I do that? Do I need to modify the script at all? Put in a function that returns the random title to the html page?
html page that calls the script
<html>
<head>
<script type='text/javascript' src='titles.js'></script>
<script>
[Code].....
View 2 Replies
View Related