JQuery :: Link To Another Page And Execute?
Sep 19, 2010
I have created a page "photography.html". When opened a bunch of thumbnails are visible. When a thumbnail is clicked, various things happen: A window with a slideshow slides in and a bigger version of the clicked image is displayed in the slideshow. Now I would like to accomplish the following: When a certain link on another page is clicked, I want to open the page photography.html and open my slideshow as if a thumb would have been clicked there. Is this somehow possible? PS: I have to admit that I am quite a newbie with both javascript and jQuery and maybe thats way over my horizon. Still I am eager to learn.
View 11 Replies
ADVERTISEMENT
Nov 17, 2006
I need to execute a function after a link to a section within the same
document has been clicked and the navigation has occurred. When using
the onclick event handler the JS function is executed before the
navigation occurs. I can't tie it to a window.onload event since the
link only navigates within the already loaded document.
I'm not having any luck searching due to not knowing what keywords to
use. I looked at an explanation of bubbling vs capturing, but that
doesn't appear to be what I need.
View 3 Replies
View Related
Mar 12, 2010
I have a javascript code which makes a word toggle links under it. For example: Before clicking on it it looks like this:
Stories:
then once its clicked on it looks like:
Stories:
story 1
story 2
story 3
How can I make it so when you click stories it creates that list and also goes to story 1. Here is the code I have:
Code:
<h2 style="margin-left : 25px;"><img src="/images/sort_ASC.gif" id="img_DegreeList5" alt="" />
<a href="javascript:toggleDegreeList(5);" style="color:#336699;">Teaching Tales</a></a></h2>
<div id="DegreeList5" style="display:none;">
<ul><ul> <li><a href="teaching_tales1.php">Story 1</a></li>
<li><a href="teaching_tales2.php">Story 2</a></li> </ul></ul>
</div>
And here is the toggledegree script
Code:
<script type="text/javascript">
var currentDegreeList = null;
function toggleDegreeList(which) {
if(currentDegreeList) {
document.getElementById('DegreeList'+currentDegreeList).style.display = 'none';
document.getElementById('img_DegreeList'+currentDegreeList).src = '/images/sort_ASC.gif';
}
if(currentDegreeList != which) {
document.getElementById('DegreeList'+which).style.display = 'block';
document.getElementById('img_DegreeList'+which).src = '/images/sort_DESC.gif';
currentDegreeList = which;
}
else {
currentDegreeList = null;
}
}
var submitted = false;
function submitForm() {
var val = (submitted) ? false : true;
submitted = true;
return val;
}
</script>
If you actually want to see the live page its here [URL].
View 3 Replies
View Related
Sep 3, 2010
I am wanting to be able to swap out any of them to make them 'primary' this works for the first click, but after the first click it makes every div id and input name the same as the first that was clicked.It's also not working AT all if i click on the bottom link first, then a link above it.Top-down works, bottom-up doesn't.
View 3 Replies
View Related
Mar 1, 2011
I have a problem hiding elements after ajax respons.
I have a JQuery script:
$(function() {
$(".tab_content").hide();
$("ul.tabs li:first").addClass("active").show();
$(".tab_content:first").show();
[Code]....
onClick event binded on <li> tag with live() works fine. But I need to hide some tags immediately after ajax call. The jquery script is included together with some HTML code in returned HTTPrespons content data. Is it possible to do this without setting css display:none property?
View 2 Replies
View Related
Dec 16, 2009
In Chrome, the login page on my schools educational online platform [URL] doesn't remember the login info. So i made a bookmark with this javascript injection, that fills in the info, and focusses on the 'aanmelden' button (='login' in dutch), so that i only have to press enter to continue. Here's the javascript injection:
Code:
javascript: document.getElementById('username').value='23889493984';document.getElementById('password').value='4 42384985';return false;document.getElementById('login').focus();
This works fine but i'd like to make it happen faster. I wish i could let the script be activated instantly when the page loads, so i only have to press enter, or if possible, let the script click the login button itself.
View 6 Replies
View Related
Feb 16, 2010
First off; i was in two minds if this belonged in the .php forum or the javascript forum; i apologize if i chose the wrong one.
I have this .php code:
<?php
$query = "SELECT mail_id FROM ".TBL_MAIL." WHERE UserTo = '$session->username' and status = 'unread'";
$numUnreadMail = $database->query($query) or die(mysql_error());
[Code]....
I wondered how or if it is even possible to use javascript to execute the first .php code so that the user would know if he/she had a new message without refreshing the page?
View 15 Replies
View Related
Apr 8, 2010
FF, Safari, Opera all execute this javascript code to refresh the page properly, but in IE version 8.0.6001.18904 the page doesn't seem to refresh on click of orange_refresh button. I have checked out a different version of IE8, don't recall exact version, but it did seem to work fine in that one, whatever version it was probably the latest now that I think of it. Check out code below any sug.'s could be helpful, though its probably a bug..
<a href="javascript:document.location.reload();"
onmouseover="window.status='Refresh'; return true"
onmouseout="window.status='Page Refreshed'"><img src="image/orange_refresh.png"
width="30" height="30" border="0" /></a>
View 5 Replies
View Related
Sep 23, 2010
I have long html/CSS (no CMS or php, etc.) web pages. Some people run away when they see too much content on a page. So I hide the large lower section of the pages and have the user click anchor text to execute simple JS code to change the display from 'none' to 'block' or back to re-hide.
Code:
(BTW my research indicates that search engines do not know the difference between display='none' and normal content, or I would not be hiding content in the first place.)
Within this hidden content, I have anchor text to provide name handles
Code:
So users can click a link and go directly to that section. Within that link I include
Code:
So that works fine within a particular page. But when I want to link to an anchor on another page which is within this hidden content, the browser cannot display the anchor text because it is still hidden.
Is there a way to execute the JS code to change the DOM, changing the display to 'block' on the content of the new page?
I do not see how, because the new page isn't loaded yet, there is no DOM within the browser yet, so how can it be manipulated?
Of course if I was using php I could generate the code with the property set as desired. But for straight up html/CSS/JS pages is this possible?
I get the feeling I am missing something simple here, either a simple solution or the simple fact that this is just an inherent limitation of html.
View 6 Replies
View Related
Jun 23, 2011
I have been trying to work my way around this issue for some time now. I am trying to stop a marquee from scrolling as soon as the page start to load not after. I have been using this to pause the marquee with JavaScript but the command does not execute but after the page loads; after all the html loads.
This is the JavaScript:
Code:
<script language="JavaScript">
window.onload=function(){
myMarquee.stop();
}
[Code].....
With this code the marquee does stop but after the page loads completely so as the page loads the marquee start to scroll and then stops as soon as the page finishes loading but with the first image of the marquee have way out. I need to be able to load the marquee 100% stopped as the page loads so then I can use the buttons I placed to control the marquee.
My question is:
Is there ANY way to completely stop the marquee from scrolling as soon as the page loads??
how to scroll the marquee by click; meaning by every click of the mouse the marquee moves either left or right, would be even better. p.s: Noted that this code does NOT work in FF for some reason. The stop does not work and the buttons don't respond. why in FF they don't work but in GC and IE they do?
View 2 Replies
View Related
Aug 22, 2002
I have a dynamic (PHP) external JavaScript file. I need to load that file every X seconds and execute its contents, given the the page is already 'Done' (fully downloaded).
How can this be done?
View 6 Replies
View Related
Aug 11, 2010
i want to run a query when the web page is closed.i think i can do this using javascript. when the browser window is closed then a javascript function will execute and the query will execute.
i'm developing jsp application. if the user closes the web window then a query should be executed which will affect the feilds in MySql database.
View 3 Replies
View Related
Mar 13, 2011
so im working on a piece of jquery/JS which executes (drops down a new div) when you click a link. I have the links setup as
<a href="#" id="d0">Execute 1</a>
<a href="#" id="d1">Execute 2</a>
<a href="#" id="d2">Execute 3</a>
And the jscript detects when d0, d1 or d2 is clicked and executes my script. It all works perfectly, however when you click on a link it will jump to the top of the page as a side effect of the a href="#" I assume?
View 1 Replies
View Related
Feb 3, 2010
I got a javascript function to pull contents from a php page, let's call this page B to the actual page, let's call this page A.
As I know when a page gets loaded the javascript on that page won't execute, am I right?
Now I need the javascript code on that page B to get executed. Is that somehow possible?
View 1 Replies
View Related
Aug 11, 2010
i want run a script where if a user closes browser window then it should execute some set of codes.
View 2 Replies
View Related
Sep 1, 2010
Is there something in javascript to make sure that the page is completely loaded and the I execute a function in javascript. Because I have a web page that i have an image slider, so if I open this page in same page before (window.location="source") so the page is loading very fast, but if I use window.open, the page will open in a new window but very slow and the slide show begin but I see that the page is still loading the images, so as result no images is shown. I need to execute the function for the images slider after the page had completely loaded.
View 1 Replies
View Related
Apr 1, 2005
I have a form within an iframe that I want to use to refresh the location of the parent. I am using the form to set session variables that are used within the parent. So in the iframe I have:
<form name="MyForm" method="POST"
action="<?php echo $_SERVER['PHP_SELF'] . '?' . SID; ?>">
And to submit this form I'm using this link:
<a href="javascript: submitform()">Search</a>
Which refers to this script:
<SCRIPT LANGUAGE="JavaScript">
<!--
function loadParent()
{
parent.location.href = "/search_results.php?";
}
function submitform()
{
document.MyForm.submit();
loadParent();
}
//-->
</SCRIPT>
(I think!) my problem is this; it works fine if the MyForm action, i.e. ="<?php echo $_SERVER['PHP_SELF'] . '?' . SID; ?>", completes before loadParent() is executed but if there is a slight delay in the time it takes for the server to do this, loadParent() is executed too early and the input from MyForm is lost.
What I need is to tell the script to wait until the MyForm action has completed, i.e. the page has refreshed, before running loadParent(). I'm sure there are loads of different ways of doing this. Ideally I would like something that detects the page refresh within the iframe (caused by the MyForm action) and not something that relies on a timed delay loop.
View 3 Replies
View Related
May 16, 2010
Is it possible, when a page is reloaded, to replace a link to a javascript in the head with a link to a different script?
View 4 Replies
View Related
Dec 21, 2011
Is it possible to have a link with an id within it such as
<li><a href='newpage.html' id='12'>Some title</a></li>
when you click on the link a new page html page opens and on that new page, information found in a database with the id of 12(as found in the link) will be displayed using external style sheets etc. Can this be done with html css javascript and json? P.S I know how to do this with php however I want this to be done in my mobile app so the actual page cannot be a .php page
View 4 Replies
View Related
Jan 21, 2010
I've made a page to listen to The Dutch Top 2000 ever.. Example : [URL] After that I want my fewers/listeners to put a new youtube link to my database by giving input from my page. Example: [URL] For my database it is required that the input only 7fXaC07X5M8 instead of the complete link. [URL] My probem is how to handle the input in my form by javascript:
<td><input type="text" name="YourLink" size="256 maxlength="256" value="http://www.youtube.com/watch?v=7fXaC07X5M8&feature=player_embedded#"></td>
To a striped link :7fXaC07X5M8 what is accepteble for my database
View 4 Replies
View Related
Jul 20, 2005
How can I use a link to both run a peice of script and link to another page?
So far I have the following:
-----------------------------------------------------------------------
<A href="javascript:GetCookie('linkcookie')">add 1 to linkcookie</A>
-----------------------------------------------------------------------
View 3 Replies
View Related
Sep 10, 2009
I created a tabbed menu with jquery. [URL]...By default the first tab is shown and the other tabs are hidden. I need to link straight to the 4th tab from a different page. If I am on the same page with the tabbed menu, the link to open my tabs are like the following: <li><a href="#tab4">4th Tab</a></li>
When I add the /#tab4 to the link from the external page, the tab does not show. Is there a way to go straight to the fourth tab when linking from a different page?
View 5 Replies
View Related
Sep 8, 2009
I am using jQuery BlockUI Plugin (v2). It works success but I have a small problem, when I click the link, it is bloclking the page but the main page goes up. Also same problem for link which is oppening new tab or new windows. main pages goes up when I click the link.
View 5 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
Feb 16, 2011
Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:
Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>
This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).
why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.
View 2 Replies
View Related
Aug 15, 2006
1. Load the first page of a series of pages into an iframe when you click a link
2. On each click load the next in order page
3. When last page has loaded if clicked again will start from the beginning.
What I am doing: I am creating a tutorial for a friend who cannot figure out how to use her new rental management program. I could use a manual slide show to have her click for the next image however, there are a LOT of tutorial images which show her what to do at that point. Her program contains a great number of setup screens, report screens etc. This means the slide show would be sitting there loading all these images before it will work. So, I figured, OK make a page with an iframe, and then I could put each image on it's own little page i.e. page1, page2 etc. Place a little button, or a next link, then have the link load the pages into the iframe in order.
View 5 Replies
View Related