Changing Font Attributes In Pop Up Window?

May 14, 2009

I am using the JK Pop-up image viewer, from JavaScript Kit for an online library exhibition I am making. I can change the background color of the pop-up window to the color of the main website (Dark Blue) however, I can not seem to find away to change the color or font style, of the text that appears in the pop-up window.I have tried using css to no success, the only way I can seem to do it is by wrapping the text for each image in the deprecated <font color> tag which i obviously don't want to do.Here is the code below:

<script type="text/javascript">
// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)

[code]....

View 2 Replies


ADVERTISEMENT

Changing Attributes Of An Existing Window?

Nov 22, 2010

I'm not really much of a javascript programmer, but I occasionally use javascript that I've found here and there. But I'm unable to find anything that helps me in what I'm trying to do now.

I regularly use a snippet of code that pops up a small window to display an image or a very small html file.Using the window.open() function, I'm able to disable scrolling, resizing, etc., and size it to my needs. I'll have a window.close link somewhere on the page. But in my current project, my customer's page has several links related to other companies. When you click on the link, an that company's ad pops up in a small window. At this point, the viewer can simply close the window, or they should be able to click on the ad and be taken to that company's website.

I'm able to have it close the window and open that new url in the parent browser window, but my website customer doesn't want their site to go away. They want the new company's website in a new window.

Or I can simply NOT close the popup window, but now the new company's website is in a relatively small browser window, unable to scroll, resize, etc. Is there a way for me to somehow modify an existing window with an onclick directive - something similar to the window.open() function, OR open a new browser window with window.open() AND close the popup window? If I haven't made myself clear, let me know and I'll try to explain myself better.

View 2 Replies View Related

Document.Body.Style.Font - Change All Of The Page's Background Attributes?

Jan 22, 2010

I assume you know about this code:


Code:
document.body.style.background = "url() fixed #000000";

where you can change all of the page's background attributes..I was wondering if there was a similar one for font so that I can change the face, size, and color of all font on the page at once (when the page loads)I want this code in javascript because I want the font style and the background color in my page generated instead of fixed

View 2 Replies View Related

Changing Font-Size

Nov 9, 2006

More and more we see on web pages the option of choosing the font size.

I would like to offer the same option on my page, but I can get started.

I know that CSS and Javascripting are working together, I just not able to change the font-size property of the CSS.

View 2 Replies View Related

Changing Class Attributes

Sep 3, 2002

I need to change dynamically how a class is displayed, my site (with out going into detail) interprets saved info from the user (its saved through perl) in a *.js file, then views it through template *.htm files drawing on js files after loading.

The thing is I need to allow for several settings like font type size and color, (things that could be held in style sheets) but then save in their js file a number representing this and load it when the template page is opened.

I have two possibilities to answer this

1, instead of using classes I could use Ids - but using 1 id for what could (hypothetically) be an endless string of elements seems real messy, I don't even know if it would work.

2, I read somewhere I could dynamically generate style tags with the classes defined, but I can't find where I read this..

View 5 Replies View Related

JQuery :: Font Size Not Changing?

Sep 15, 2011

I;m trying to implement increase/decrease font size buttons on a site, but nothing is happening. I've set breakpoints and tried changing $('html') to $('body') and although the code runs, no attributes are set. The code I'm using is:

[Code]...

Even if I remove the cookie, the code runs but nothing happens. Am I missing something obvious?

View 1 Replies View Related

Changing Font Face And Color

Oct 18, 2005

Below is a script for a simple site search for which I would like to be able to change the font face and/or color for the research results produced by the script.? Code:

View 1 Replies View Related

JQuery :: Changing Style Attributes?

Jul 24, 2009

OK, been banging my head with this for a while. I have a dynamic sitewhere we get a list of elements from the database, we identify theseitems with id numbers and encoded get strings. So I'm trying to getstyle changes to take affect with jquery and it really just doesn'twork.I'm not sure what I'm doing wrong. Here is the source code:

<html>
<head>
<script type=text/javascript src=/scripts/jquery-1.3.2.min.js></

[code]....

View 2 Replies View Related

Changing Attributes Of Input Tag In Cloned Row?

Jun 24, 2010

I'm extending the number of rows of a table by cloning the last row (=newLastRow). Each row has a single input tag in it, with a name which includes the row number and an onclick function call which passes the row number to the function:<input type='text' class='clickable' name='inp8.1' size='20' value='xyx' onclick='toggle("table8");'>The new cloned row has an input tag with the same parameter value as the cloned one, obviously. I need to increment this: name='inp9.1', 'toggle("table9")'.y question is simple but I'm just starting with DOM: how do I refer to the input tag in the newLastRow so I can change these values?

View 2 Replies View Related

Changing Font Color Of Each Character Of InnerHTML?

Aug 1, 2011

I am trying to change the font color of each character of the innerHTML of a div. I have tried the following but obviously I have not gotten it to work.

This is just a snapshot of the javascript which I have that "changes the color and size of the characters..

Code:

function change()
{
var r = 0;
var len = document.getElementById("userInput").value.length;

[Code]....

View 4 Replies View Related

JQuery :: Changing Form Field Attributes

Feb 3, 2009

I've got a set of input fields of type text, that I want to change to hidden. The fields are identified by the class name .navtitle. Here is the code I've written to try and change the fields:

Code JavaScript:
$(".navtitle").each(function() {
this.type = "hidden";
});

This works fine in Firefox, but doesn't work in IE, and worse still, breaks all of the other JQuery code I've got as well.

View 6 Replies View Related

Changing Font-size Property In Body Definition?

Mar 27, 2010

I've got a website with font sizes using 'em's. I've made it so that in my 'body' CSS styling, I can change the font size and it changes it right throughout the whole site.

I have hyperlinks to increase and decrease the font size but have no idea how to get the links to change the 'font-size' property in my 'body' definition. As a secondary requirement (but not essential) I also need to remember this value and store in a cookie so the user doesn't need to keep resizing the page on every reload.

View 4 Replies View Related

Application In Java For Changing Text - Choose The Font

Oct 7, 2009

I Am making a site for tattoos and i see somewhere an application in Java for changing text, it was simple text box where you write the text you want and down you choose the Font and down you have the text you want in the wanted fond.

View 10 Replies View Related

Dynamically Changing Attributes - Making A Spreadsheet Like Webpage

Dec 21, 2009

I'm currently in the process of making a spreadsheet like webpage and it all working fine... However I have been using setAttribute and removeAttribute in order to dynamically change a table cells onclick property.

This of course does not work in IE7 etc and I've been banging my head against a brick wall trying to come up with a solution that will work in all browsers but I just can't seem to get it to work with using methods such as...

I get all sorts of not implemented, type mismatch errors when I try to use the above.

Below is the setAttribute code which works.

View 6 Replies View Related

JQuery :: Changing Font-size Based On Characters Count?

Sep 10, 2010

I'm reading jQuery in Action for my learning and thought I could start with a simple exercise for my page: I have several divs of the class ".important_new" with headings in there which are links to the articles:

<div class="important_new">
<h1><a href="#">New York Knicks sign Patrick Ewing Jr.</a></h1>
<img class="important_new_flag" src="images/body/flags/USA.png" />
<span class="important_new_country">USA</span>

[Code]....

This results in displaying all the headings in an 8px font size except two of them (which don't have more than 40 characters either). The 40+ character headings also get reduced.

I've gone through it lots of times and changed a ton of things, but can get more than that. Can anyone see what my failing/s are?

View 2 Replies View Related

Dynamically Changing Label Font Color When Radio Button Is Clicked?

Feb 6, 2011

I am building an online survey using a survey creation tool which allows me to incorporate javascript for additional functionality. However, I am new to javascript so would appreciate any help that you could provide me with.

I have question types like agreement scales, where the respondent sees a list of statements and has to rate each one by clicking on a radio button. The source code of the matrix table looks like this:

[Code].....

This code works as intended; however, as you can see, it loops through all the radio buttons when one is clicked. Is there a way to accomplish this without looping through all the radios, and thus make the script run faster?

Also, I have read that the addEventListener function does not work for older versions of IE. Is there a simpler alternative?

View 6 Replies View Related

Window Doesn't Resize And None Of The Attributes Are Working?

Mar 25, 2009

this seems to work but the new window doesn't resize and none of the attributes are working?

<form name="login" action="secure/checkuser.php" method="post" target="mywindow" onsubmit="window.open('mywindow','width=400,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=no,scrollbars=yes,copyhistory=yes,resizable=no')">

View 2 Replies View Related

Window.open Not Setting Attributes Correctly?

Aug 17, 2010

I'm using window.open to open to display some info in a new window. The info displays correctly, but the resizeable, scrollbars, width, and height attributes don't seem to be setting correctly. The window isn't resizeable, and the width/height is way off.

Code:
window.open(windowURL, "_blank", "location=0,status=1,scrollbars=1,resizeable=yes,width=500,height=600");

View 1 Replies View Related

CSS And Form Validation - Changing The Font Color Of Labels ONLY When Stop The Form From Submitting Due To Blank Fields

Nov 2, 2011

I'm having trouble changing the font color of my labels ONLY when I stop the form from submitting due to blank fields. I'm not sure whether if just changing my CSS will achieve what I want, or am I going to have to add somethig to my if else statement, or both? I would think I would need to change CSS to :

label.onfocus {
color:red;
}

but a little confused on what else.

<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en" lang="en">
<head>
[Code]...

View 21 Replies View Related

Font Size Increase / Decrease Based On Window Resize?

Jun 15, 2010

i have one issue on Font resizing - To set proportional fonts(i.e Arial or verdana) to match window size. That is, if this setting is in effect, and the window is enlarged, then the font size should correspondingly increase.if you get the browser's width and height details on window resize,is it possible through javascript?

View 1 Replies View Related

Link In New Window Changing Value Of <input> In Parent Window

Feb 28, 2002

I'm building a program for webmasters, and I need to have it so that I can have an <INPUT> button that, when clicked, will open up a new window (400x350 pixels) with a list of links. However, when the person clicks one of those links, the window closes, the value of an <input type="text" name="parentdoc" size="8" maxlength="8" readonly> is updated.

How would I accomplish this?

(As I mentioned above, I am very new to JavaScript, so please provide as much explanation and code as possible.)

View 6 Replies View Related

Changing Window Title From Parent Window

Jul 23, 2005

I'm opening a window with a SWF inside (no HTML, just the SWF) but in the
title bar appears something like

http://www.server.com/myDir/myWeb/Flash/myFlash.swf

i'd like to write something like "Wow!! look thos flash!!!".

Could I do that from the function who launch it??? with something like this?

myWin.title = 'Hello world!!!'

View 3 Replies View Related

Font Size Aspect Ratio Change With Window Size

Apr 14, 2011

where da boss wants our a large piece of our site to be fully dynamic and integrated on any screen size. This means changing font on size. Well I cam up with a solution, figured if no one has one better, then i'll share

[Code]..

View 7 Replies View Related

Changing Window Size

Oct 5, 2003

I have a photo gallery which lists out a bunch of photos. You can click on one which will open the photo in another window for you to view. In this window then, you are able to go to the next image, to the previous one, etc.

Now, I have some images which are portrait style, some are landscape. I want to have the window that the images show in to be adjusted on the fly depending on the orientation of the photo. I.e., if the photo is landscape, I want to display it in a window which is 800x600 in size; if it's portrait, I want to display it in a window which is 600x800.

All the thumbnails have the following code for their href: Code:

View 1 Replies View Related

Changing Window Height With A Function

Jul 20, 2005

I'm struggling with the following :

I want a function on my form and when I'm calling that function (i.e.
pressing a button), I want to resize the window (only height) with the
paramater that I'm supplying to that function. Is it possible?

View 1 Replies View Related

Changing Values In The Parent Window

Aug 25, 2003

I have the following code in a popup window.

Code:

<td bgcolor="#000000" onClick="javascript:setRGB(0, 0, 0);" class="swatch"></td>
<td bgcolor="#000033" onClick="javascript:setRGB(0, 0, 51);" class="swatch"></td>
<td bgcolor="#000066" onClick="javascript:setRGB(0, 0, 102);" class="swatch"></td>
What I want to do is to define the setRGB function so that when I click on a color swatch (onClick) it updates 3 fields in a form in the window that opened the popup with the corresponding RGB values. So let's say that in the window that opened the popup i have a form 'formname' with three text fields named 'red', 'green' and 'blue'.

View 2 Replies View Related







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