JQuery :: Incorporate Two Files - If The Main Js Is On The Page Part Of The Page Does Not Work?
Jun 22, 2011
I am trying to incorporate two javascript files (using jQuery) and they are creating a conflict.If the main js is on the page part of the page does not work. If I do not include it my menu and some related features do not work correctly.One code is long so here is the link to it: *I removed Link* (this is the main code for the menu etc)The other js is:
$(document).ready(function(){
Engine.Initialize();
if( !$('body').hasClass('index') && !$('body').hasClass('homepage') ) {[code]....
View 2 Replies
ADVERTISEMENT
Nov 27, 2011
I have an image insertion page that is part of a JS WYSIWYG. It works okay, but I would like to add a styled caption bar underneath it.
This is what I'm currently using for the caption (inserted by a button):
Code:
This is the code from the insert image page:
Code:
How do I put the caption bar after the image in the main code?
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
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 23, 2011
When I load a page into an existing page I think the div's are not nested properly therefore the javascript is not working correctly. What's happening is ALL the div's on the second page are showing. I just need the first div to show then when you click on the <li> element the other div shoes. It works fine when the page loaded by istself. Here is my code:MAIN
PAGE:<
div
id
[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
Mar 22, 2009
I'm designing a web page, Having a banner on top, then a search option following it.There is a menu item list below it on to the left.And the content of the links of those menu item should get loaded in the center of the page.And a footer having some copyright info.All these are in div tags. The problem is when i click on any menu item it should be loaded in the center div tag.Ive tried using Iframes but there is a scrollbar coming only in that area of center div tag.I don't wan't this to happen.Based on the size of the html page to be loaded the div tag size should increase, and so the whole page.Have tried using Ajax but not working.
View 1 Replies
View Related
Aug 22, 2011
Our company own a lot of domains and want to put a short page of copy on each address along with keywords before redirecting the user to our main site. I have been able to get the page to load the main site after the desired time using this code in the head...
<META HTTP-EQUIV="refresh" CONTENT="40;URL=http://webaddress.com/">
That works perfectly, I am now trying to display a countdown timer from 40 seconds down to 0, and on 0 redirect the user. Saying something like "You will be redirected in XX seconds". Is there anyway of doing this? I've been searching google for the answers with no luck and can only seem to find timers that countdown to a set date.
View 13 Replies
View Related
May 21, 2009
I am currently programming Script Adds data to the database but if i want to Shown the data that have been added Requires refresh the page to show the Data that have been added . and I do not want this method.I want to when adding data to show updates as soon as the addition of data.This can be done by Ajax , and An example of this method used Google Gmail.
View 3 Replies
View Related
Jun 4, 2011
My goal right now is to make a two-part navigation bar where you don't have to reload the whole site, when you click on a link. The navigation bar consists of two <ul> lists with <li> float:left and <a> display:block, so I basically have two lines. It's probably easier to understand if you see it for yourself: jsfiddle (had to change the css style, because I use .less but it works)
When you load the page it's just like that, you have your main category (A,B,C,D,...) and the sub-category (A1,A2,A3,...). What I want: If you click on B, the sub category changes to B1,B2,.... If you click on a sub category the site loads the requested page (with ajax = best solution?!)
My thoughts
At first I thought about just changing the name and href attribute of the second list, but the main categories have different amounts of sub categories, so I would need to add or remove <li>'s. Then I thought about using .load() but I somehow screwed up (of course) and the loaded <ul> doesn't have any css style (wrong order?) and I can't see anything. (with a loaded test.html site containing only the word "test" it worked) Is ajax "overkill" as a solution?
CodeIgniter and the URL
I use CodeIgniter (a PHP framework) for the website and URLs like this: www.example.com/maincategory/subcategory (e.g. example.com/A/A3) That's no problem at all, if I don't use any javascript and reload the whole site every time. But is it possible to change the URL with jQuery when the user clicks through the navigation bar? You click on B, the URL changes to example.com/B all the subcategories change to B1,B2,...When you click on B2 the URL changes to example.com/B/B2 and the site loads the requested page (I guess with ajax, so the navigation stays the same?!)
Minor problem: when you load the site, click on B, then B3 for example, you would get the url example.com/B/B3. If you now save this link, close the site and reopen it with the link, CodeIgniter would load the right site and everything, but the navigation would show A1,A2,.. in the sub category.
Hover vs click
Almost every page where I saw this kind of menu they used hover to change the sub category. But I thought click would be better, so you don't have to avoid touching B,C,D,.. if you want to go from A to A9 for example. Only downside is that you have to click before you see the sub categories.
Summary
A two part navigation menu you can use without reloading, changing URLs (when possible) and probably ajax to load the actual content.
View 2 Replies
View Related
Apr 14, 2009
I'm having a problem on a particular site I am working on.
The URL is [url]
The problem is that when I try to close the browser in IE on the main page I get an popup with an error which says: "An error has occured on the script on this page"
Do you want to continue running scripts on this page?
"Yes" or "No" (Buttons to Click)
I have to click the 'Yes' button about thirty times before the browser will finally close. Does anyone have any idea what this is?
Here is the source code.
Code:
View 2 Replies
View Related
Aug 31, 2009
Is there any plugin can let me save the part of page as pdf?
View 2 Replies
View Related
Feb 19, 2010
i have 2 pages one is the main and the other is the sub-main
main,html :
<A href="sub-main.html#post5>go and load just post 5</a>
sub-main.html :
<DIV class=posttop id="post4">
here you can write anything ;)
[Code]....
as shown up the code will first load everything in the sub-main.html page then after Finnish loading will reference to the specific post "post5" and selected of highlighted but if the numbers of the post lets say 20 posts inside the sub-main.html it's will take to load forever . what i want to is when i click the link in main.html to go to the post5 in the other page how can i load just the div element of the "post5" and the rest give the user the option to load it if he wish to see the whole posts
View 2 Replies
View Related
Jul 12, 2010
I tried finding a similar situation in the forums, but was unable to discover anything sepcific. I think I may be way off here, and or trying to do something bizarre, but what I am trying to do is change only part of the the url for all of the links on a page. So say I want to change:
href="/something/something/all"
to
href="/something/something/specific"
I think I need to use each() in combination with attr but I am not exactly sure how. This is what I have so far (with no luck):
$('a').each( {
$(this).attr('href').replace('all','specific');
});
I've successfully changed part of a single link based of it's enclosing div id, but if there is more than one link in the div, it replaces the entire href of all the other links in that div to be the same as the first one. So that's why I think I need to use each(). But again, I'm not sure how to do this properly in this case.
View 2 Replies
View Related
Dec 10, 2009
I would like to achieve such thing, as to load some part of other page, like this:
$("#content").load("example.com/main.htm #content > div");
but I need to do a beforeSend callback, to fade out the current content, wait until it is fully hidden, and only then fade in with the received ajax request. But doing this, for example, with .ajaxSend, the content loads much quicker, then fadeOut is complete.
View 1 Replies
View Related
Apr 6, 2011
But I am doing both front and backend for a project and having an issue with a jquery slider which, when inserted, is breaking 2 other js scripts in the page, including my main menu.Can anyone point me to a resource that outlines best practices for working with more than one js library and/or raw js .I'm doing some tests on the order of the scripts right now, but wanted to put a feeler out there to see if someone has dealt with this before.
View 1 Replies
View Related
Jun 16, 2009
i have a sliced page from photoshop. how i can change the main banner part at the top so that it gradualy changes over a period of time, i was thinking maybe a swap image thing, but not sure.
View 1 Replies
View Related
Sep 21, 2011
I have an ajax script which loads new content onto the page when the main navigation links is clicked. I also have a jquery script which fades divs in and out when another subset of links are clicked.
I guess these scripts essentially do the same thing but the first basically is loading in 'pages' without the page having to refresh. The second is just fading in and out divs that are on a page.
The problem is is that the second script only seems to work once, when the page is loaded.
Here they are:
View 2 Replies
View Related
Jun 7, 2010
i've a div that contains a form, each of these elements have their own id; the structure is something like this
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="art-header-tag-icon">[code].....
I'd want that: at the first user's click on the #register div, the div #registerForm become visible, it should remains visible also when the user click the submit button within and it should disappear if the user click a second time on the #register.I partially solved my problems with this:
$(document).ready(function(){
$("#registerForm").css("display","none");
$("#register").toggle(function(){[code]....
but i can't resolve the submit issue: whenever a user submit the form in the #loginForm div, the page refresh and the main div return invisible.
View 1 Replies
View Related
Apr 10, 2010
Just wondering if it's possible to use JQuery to create a 'download all' link? I have a number of .zip files linked to in a page and I want to offer a quick way to download all of them at once or specific sets based on the id of the link. That possible?
View 1 Replies
View Related
May 16, 2011
adding a counter to my script.
So i have 2 files,
A index.php(I deleted some stuff for sake of privacy)
[Code]....
View 1 Replies
View Related
Jun 15, 2009
I've got a text area with a vertical scrolldown bar. Using the following JS code the text area scrolls down as I'd expect:
document.getElementById(ID GOES HERE).scrollIntoView(true);
But the main are also scrolls down - is there any way to stop the main page scrolling down too?
View 2 Replies
View Related
Jul 23, 2005
How do you print part of an html page using the javascript print()
function? Is it possible to put the printable area inside a
<div></div> block and print it, or can you use a hidden style then
print it?
Is there a site on the www which has some information?
View 4 Replies
View Related
Feb 15, 2006
Is it possible to refresh only part of a page rather than reload the
entire thing?
I have dropdown box that's populated from a database using ASP that I
need refreshed but I don't want to reload the entire page.
View 6 Replies
View Related
Jul 20, 2005
is it possible to use the javascript:window.print() command to print only a
part of my window, lets say a table without navigation?
View 1 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