Smart "Top Of Page" Script?

Sep 29, 2004

I found this code online. It detects if vertical scrollbars are present in your browser, and if so, it adds a link to the top of the page at the bottom of the open page.

The only thing is, it prints the link in the bottom left corner of the screen, and I really need it to show up in a specific area. Does anyone know of a similar script I can use for that? I want one that will only show up if the page has vertical scrollbars. Code:

View 21 Replies


ADVERTISEMENT

Smart Substring

Sep 9, 2007

If I have the following variable which contains the drop down menu for list of card numebrs:

var abc='<option value="1234567890123456">1234567890123456</option><option value="0987654321987654">0987654321987654</option><option value="0147852369014785">0147852369014785</option>'

How can I pass this variable to a function and mask only the dispalyed card number? i.e. to have the following result:

<option value="1234567890123456">1234XXXXXXXX3456</option><option value="0987654321987654">0987XXXXXXXX7654</option><option value="0147852369014785">0147XXXXXXXX4785</option>

Note: the number of options in the drop down menu may varry, in this example its only 3 options, it might be more or less, this is why I called it "Smart Substring".

View 1 Replies View Related

Making A Smart Regex

Dec 14, 2005

I am trying to write a regex that will parse BBcode into HTML using
JavaScript. Everything was going smoothly using the string class
replace() operator with regex's until I got to the list tag.
Implementing the list tag itself was fairly easy. What was not was
trying to handle the list items. For some reason, in BBcode, they
didn't bother defining an end tag for a list item. I guess that they
designed it with bad old HTML 3.2 in mind where you could make a list
by using:

<ul>
<li>item 1
<li>item2
</ul>

However, I need to make this XHTML compliant, so I needed to add the
</li> tag into the mix. Unfortunately, the only way to find where to
put it is to find the next[*] (<li>) tag or an open list (in the case
of nested lists) or close list tag. I was trying to get a rule that
handles the list items to work, but it only matches the first item in
any list. Here is the line of code:

bbcode =
bbcode.replace(/[list(=1|=a|)](.*?)[*](.*?)([*]|[list]|[/list])/g,
'[list$1]$2<li>$3</li>$4');

First, I check to make sure that the list item is inside a list. Then,
I match the[*] tag to find the start of the item, then I match either
the next[*],, orto determine the end of the item.
This successfully prevents a list item outside of a list from being
made into a <li> element, but only matches the first list item in a
list. Is there any way to make this match all occurances of this
pattern without looping over the statement until the pattern can no
longer be found?

View 13 Replies View Related

Building 'smart' Forms With DOM 2

Mar 14, 2003

I'm fooling around with building a form that grows depending on the users input (relatively new to DOM 2 - but fun stuff!) I'm working on getting it to work (rather than being pretty - there are many improvements that could be made).

My question is has anyone seen any similar examples out there? The more I build on this thing, the more I believe there has to be another way... (like rather than creating every pull-down box - yes, I should put that into it's own function! - should I be playing with visibility and positioning?) Code:

View 1 Replies View Related

JScript Smart Table

May 4, 2006

I have an application where I have 9 items to choose from and desire a table that will allow only 3 items (any 3 items) to be chosen then check out of the table.Check out can not be allowed unless only 3 items are selected.

Is the JScript applications somewhere that will perform this logic?

View 2 Replies View Related

Smart AJAX Autosave?

Dec 5, 2006

I have an autosave feature that, well... autosaves every minute. Now I could very well become the biggest abuser of my own feature. I currently have 8 windows open - I tend to just leave windows open for a long time. As a result, the javascript would be running every minute saving, creating unnecessary load on the server.

How could I make the autosave smart and only save if they are actively "working" with it? The only thing I can really think of is to have like a variable that sets to true whenever something happens, set to false whenever it saves, and only save when the var is true. Problem is, I have a lot of functions for events that I would need to attach it to... I'm sure I would miss it somewhere.

View 3 Replies View Related

Replace Smart Quotes And Not HTML?

Jun 2, 2009

I'm using this rich text editor. Whenever a user pastes rich text from a program like Microsoft Word, the program's smart quotes are not understood by the browser (they appear as a diamond with a question mark in it). I ran a php function on the post value to replace all quotes with ascii characters, but realized that it also replaces the quotes present in the html generated by the javascript.Is there a way to convert smart quotes to normal quotes without also tampering with the html content?

View 1 Replies View Related

Smart Card Reader - Make It Run In All Browsers?

Sep 8, 2010

How can I write javascript codes to interact with a smart card reader? I have found some activex controls and examples, but I think, it will be limited to IE only.How can I make it run in all browsers, if the card reader driver is installed, and the hardware is available for use?My problem is to make sure that the user puts his/her own smart card in the reader unit before he signs up in a website (a particular website, that I will be coding for).

View 1 Replies View Related

Smart Search Form & Browsers Saved Search Fields?

Aug 18, 2010

I have created a similar smart search like yellowpages:[URL]... Here is the problem I have with mine:

Lets say I search 'Attorneys' I start typing 'Att' ... then 'Attorneys' shows up in the smart search so I click on it and press enter. The next time I start typing 'Att' my browsers saved search field pops up over the websites smart search. Here is an image which might help explain the problem a bit more:

View 1 Replies View Related

JQuery :: Part Page Refresh - Load Page It Does Nothing Only Blank Page

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

First Page| Next Page | Previous Page| Last Page Links?

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

Ajax :: Loadd Page In Div - Redirect All Page To Another Page After

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

JQuery :: Crashing The Page - Current Events Page And A Past Events Page

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

JQuery :: Login Script - Replace, The ?secure-page Part With The File Name Of The Page?

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

JQuery :: Cookie Plugin To Remember The State Of A Navigation Menu From Page To Page

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

JQuery :: Triggering Click Event On Parent Page From A Page Being Loaded Via .html()

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

Dynamically Change The Font Family Of The Loaded Html Page Of The Main Page?

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

Make Whole Page Send The User After Some Seconds To Another Page And Not Only The Iframe And Parent Location?

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

Perform A Find In Page Search That Looks At A Specific Link, Opens The Page In A New Window?

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

JQuery :: Goes To The Save_edits Page Instead Of Just Using The Post And Staying On The Original Page - Mozilla Not Working

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

Problem With Html Page Using Cached Page In Window.open(url) Call

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

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 View Related

JQuery :: Show Alert When Moving To Other Page Without Saving Current Page?

Sep 4, 2010

My requirement is, I have multiple pages in tab format. If i am on first page in edit mode and change any control's value and without saving information i click on other tab that particular time a popup should appear showing validation message say "you are moving without save and it will loos all changes either click ok to loose the changes and move to other page or click cancel to remain on the current page."I tried using var isDirty = false; var msg = 'This page has unsaved changes.Click OK to abandon the changes and leave the page.Click Cancel to stay on the page so that you can save your changes.';

$(document).ready(function ()
{
$(':input').change(function ()

[code]....

View 1 Replies View Related

Passing Form Input Data From One Page To Another Without Control Of The Receiving Page

Jul 31, 2009

I've been searching for a few hours and haven't been able to find a code snippet to see if this is available. I'm attempting to pass text from my website to another website that has a form setup on it. I'd like to fill in the pertinent data for my users on the page that I load for them. I cannot make any changes to the receiving page as it is run by another company. I've pasted some of the code that is available on the receiving form.

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {

[Code]....

View 5 Replies View Related

Loading External JS Before Page Page Load (specific Span Element)

Jul 19, 2010

My goal is to load the JS for a specific element before displaying that element. I integrated a third part script, and it works well. I set the timer here:

The JS is in my heading as <script type="text/javascript" src="countdownpro.js"></script>

About mid-body I have: <span id="countdown1">2010-07-20 00:00:00 GMT+00:00</span> which allows for the setting of a target date to countdown to.

When the page first loads it shows the above long format target time, until the js/meta tags kick in to modify it to just show the actual countdown as 00:00:00.

I have attached countdownpro.js to this post. I tried shifting the function CD_Init() to the top of the script, and also appended it inline with the .html. I tried setting the big external script to "defer", but neither arrangement worked. I also tried placing the src file right at the top.

View 2 Replies View Related

JS Script To Center Page Briefly Shifts Page To Left Before Centering?

Oct 26, 2009

I have absolutely positioned left-aligned elements that I'm attempting to center with javascript.The page briefly shifts to the left when the page is loaded before it centers the page.(I realize that this goal could be achieved with CSS alone but I am hoping for a cure for this javascript solution for now.)The javascript that I'm using is common.js, the onload command is positionPage(); and the div is DivLayout.I don't know if I need to adjust the div, javascript or both.how I can correct the shifting issue?Here is the link to view my issue: http:/tiny.cc/test176

Below is the javascript code:
window.onresize=positionPage;
String.prototype.trim = function() { return this.replace(/^s+|s+$/, ''); };[code]...........

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved