Program - Displays My Age On My Blog In The Format ?

Apr 9, 2011

I have previously copied and adapted Javascript examples from textbooks but yesterday I wrote my first program from scratch. The script basically displays my age on my blog in the format 'I am 20 years, 6 months and 12 days old.' The script automatically adjusts my age each day. I would love to receive some critique on my program; particularly on programming style, use of comments, and whether the code is generally well written.

Calculates the difference between the two dates, and convert into days

Calculating Years

Rounds years_old and years_old_r to the nearest whole number

Calculating Months

Calculating Days

View 8 Replies


ADVERTISEMENT

Program That Calculates And Displays A Person's Body Mass Index - BMI

Feb 22, 2010

Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or under-weight for his or her height. A person's BMI is calculated with the following forula: BMI = weight x 703 / height^2

Where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person's weight is considered optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered underweight. If the BMI value is greater than 25, the person is considered overweight.

View 2 Replies View Related

DHTML Program For Design Tourism Management Program

Aug 15, 2011

i'm in need of a DHTML program for design tourism management program.. Since i don't have idea on it i unable to design it.

View 1 Replies View Related

JQuery :: DatePicker Plugin - Change Default Format To US Date Format - M/d/Y

Jun 5, 2009

Iam using JQuery DatePicker Plugin , created by Kelvin Luck [url]. Plugins default format is d/m/Y. how to change its default format to US Date format (m/d/Y).

View 1 Replies View Related

Put A Blog On My Website?

Nov 23, 2010

I am building a website and on my homepage there is a small section where I want recent blogs to be posted. Of course I want a page for blogging also. how to do this?

View 5 Replies View Related

Customizing Blog Import With CSS?

May 1, 2010

I am importing a Word Press blog to a web site, but it looks kind of sloppy. You can see it here : What I need to do is just present the title, and maybe the first 100 characters, then have a "read more" link. Once this link is clicked, the full article will show on the same page.

I think I might need to use a JavaScript library as well, but I know I will need some CSS. If someone could give me a general idea of how to go about this,

View 1 Replies View Related

Poll For Each Story In Blog

Jun 14, 2010

1. Yes you're bad (344567)| 2.No you're good (5676)| Here 5 stars they can rate. the numbers stand for how much people clicked on that option But it is a blog with wordpress system . But every story need there own poll. And i m not a expert in xml or what other system i need to build this.

View 4 Replies View Related

Software To Post Blog Comments

Nov 23, 2005

I'm from a non-profit organization, working for gender equality. We wish to get a small message across to sister blogs (blogs with a common thread, purpose) Code:

View 4 Replies View Related

Split Test Url Links On A Blog Post?

Nov 13, 2009

I have searched wide and far for something like this. Thought I would find it because it is something that has become quite big these days - split testing.Possibly some php to put in the head that would open and get a value from a text file. myfile.txtInside the myfile.txt file is either a 1 or a 0. Each time it is opened to read/write, it switches... 1 for 0, or 0 for 1. A switch or toggle.Then in the body, javascript only (cannot use php in the body because I want to be able to add javascript into a wordpress or similar blog post) and a value could be sent from the php in the head (hardcoded) to the javascript...IF the var is 1, then "http://linkA.php"ELSE "http://linkB.php"The php can read (get the number in the myfile.txt), then write with the other - 1 or 0.No matter what page I add the js script to, each post can use the php code values in the <head> / the myfile.txt file.This seems like it should be straight forward, and I know it can get a little more involved if we first check for a file, and if no exist, then create.

View 3 Replies View Related

Two Dropdown List Search For My Posting In Blog

Oct 14, 2010

I would like to have two dropdown list search for my posting in my blog. Example: First dropdown list : Select Cuisine Second dropdown list : Select Location Then Search button. I can't figure out the javescripts.

View 3 Replies View Related

JQuery :: Put Together A Adobe Air Application That Is Basically A RSS Feeder For My Blog ?

May 29, 2009

I am trying to put together a Adobe Air Application that is basically a RSS feeder for my blog (custom made). I have the Air application all design and coded on the front end in terms of how it looks. My problem now is that I dont know how to get that XML document to my Air application using jQuery. Im still a beginner at jQuery (and JS in general).

View 1 Replies View Related

Code - Redirect All Of The IE Users To My Blog Instead Of My Main Page

Nov 23, 2010

I am looking for some code to redirect all of the IE users to my blog instead of my main page.

View 14 Replies View Related

Always Display "Wrong Email Format" Even By Entering The Valid Format

May 25, 2011

Ask for correction my regular expression.

Here the code..

Each enter a email in the textfield would displays "Valid email format", but always display "Wrong email format" even by entering the valid format.

View 2 Replies View Related

JQuery :: IE - When Connect Through Reverse Proxy To Blog Theme Does Not Load The Ie7.css

Jan 28, 2010

I have set up a reverse proxy for a wordpress blog that is using the theme mystique. When I use IE to connect directly to the blog the theme works fine and loads ie7.css When I connect through the reverse proxy to the blog the theme does not load the ie7.css

From what I can work out it looks like the person who wrote it is using jquery to determine the browser type. Any ideas why jquery would fail when passed through a reverse proxy?

View 2 Replies View Related

JQuery :: Blog Entry - How To Toggle Specific Class Element

Nov 6, 2010

On my website I have a lot of entries which are similar to blog-entries. Every single entry has about 500 signs and if there are more than there is supposed to be a button "read further"(atm there is no button but later it will be). If the user click this button, the remaining text of the entry is supposed to slide down. My problem is now that I don't know how to slide down just one article. Every article looks like this:

<article class="dark">
<div class="text"><h2>Title</h2> .....
<div class="slide_text"> .....
</div></div>
</article>

But how to slide down only the "slide_text" which belongs to the clicked article. If I use:
$('article').click(function() {
$('.slide_text').slideToggle(200);
});
Every singe "slide_text" of all the entries appears. But this is not, what I want. Is there a way to toggle just the child-slide_text of one entry? Or do I have to give every entry an id to define which entry is supposed to toggle?

View 1 Replies View Related

Make Custom Playlist For Window Media Player In A Blog?

Apr 12, 2009

I have a blog which is dedicated to english music. I was using flash audio player before but now using window media player. Iam successfully runing the code in my blog and using a playlist in which songs play one by one, but i want to make the song list visible in my blog so that people coming in can decide themselves what to listen. so i want to make a playlist above or below the player so that songs are visible for selection and for listening. The current code which i am using now is.......

<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows� Media Player components..." TYPE="application/x-oleobject" width="280" height="46">

[code]....

View 2 Replies View Related

Give The Client An Option Of Having A Blog Set Up Withtheir Website By Using A Select Tag?

May 13, 2009

I am trying to give the client an option of having a blog set up withtheir website by using a select tag and some javascript.Problem is the js is not updating the variable - so I must have got something wrong.This is my select code ( it uses a bit of php at the top of the page) :

$N_blog_cd = "n";
$blog = array(
"y"=>'Yes',

[code]....

View 6 Replies View Related

JQuery :: Adapting Xhtml Layout For Photo Slider To PHP Blog Template?

Jun 18, 2009

I am hoping to use a 3rd party script for a simple JQuery photo slider for my WP blog. But the script creator says: "If you are trying to 'include' this into a blog template then you will need to have a good knowledge of the template structure and how it is pulling the information from the database. The files that I supply are intended for use in a normal xhtml page where you would just add the javascript calls and stylesheet links to the page head, then embed the xhtml into the web page or use a simple php 'include' to add this at run time." He couldn't help further. The blog theme I purchase comes with a photo slider but I wasn't happy with it 100%. I took the code from the new one and put it in as best as I could where the original one was formatted. I am not a programmer though and I know that clearly I did not do it right, as I used "a" ids like you would in HTML and I know they don't belong in PHP. However, it magically is working somewhat! All the graphics are showing, it's pulling images, and they are sliding. I just need to clean it up a bit. Here is a page where it is on:

[Code]...

View 2 Replies View Related

Decode Code - Injected Into Wordpress Blog Header And Script Automatically Forwards Visitors To Other Websites

Feb 27, 2010

Recently I had a piece of code injected into my wordpress blog header and the script automatically forwards visitors to other websites. I do not know who did it, as they left this piece of cryptic script on it. Can anybody decode it so I can do some investigative work to see who put it there?

CODE:

View 6 Replies View Related

One Grid Displays Numbers, True Or False And Yes Or No, And The Other Grid Displays Letters, True, False, Yes And No?

Feb 15, 2012

I have two grids, they both display buttons. One grid displays numbers, true or false and yes or no, and the other grid displays letters, true, false, yes and no.

The second grid is not displayed in the code (used css to not display second grid buttons (.answerBtns)) Now using the getButtons() function, if the user selects button "1" in first grid (the grid which you have to open using (Open Grid) link, then it should display button "A" in second grid, if user selects button "2" in first grid, then it should displays buttons "A" and "B" in second grid, if "3" then display "A", "B" and "C" and so on.

Now except using if statements and stating which buttons should be displayed and not displayed depending on the button chosen in first grid, is there a more efficent way of coding this so that the display of buttons in second grid depends on what is selected in the first grid?

If it is using an array can somebody show a sample of this in their answer. You can just do it for one example and then I should be able to use that to fill it for the other buttons.

View 1 Replies View Related

Offsetheight Displays 0 In IE

Nov 14, 2007

i've got a .net page with a table sitting in it that has no specified height.
I want to be able to grab the height of a specific table (ID="printIntro"). Firefox spits out a number, but IE regardless of version spits out a big fat 0.

from what i understood, IE should be able to understand offsetheight, no?
here's a snippet of a VERY simplified version of what .net generates, as you will see IE will return 0: Code:

View 8 Replies View Related

Create A Program In JS?

Oct 27, 2011

I have an assignment to create a program in JS but I have not read JS much more. So, for this assignment, can anyone help me to solve this assignment? Check attachment. [URL]

View 1 Replies View Related

Run Program - .js Extension ?

May 5, 2011

How to run ajavascrpt prgram...i.e .js extension........

Is it to be run in dreamweaver...or any other simple way is there......or it is to be embedded in html code...and then run as .html extension...

View 1 Replies View Related

Unable To Get Value In The Program

Feb 18, 2009

in javascript i pass value to a hidden field and i get that in alert msg but the same value i am not able to get in teh code behind page in asp.net

alert(document.form1.id.value)

in page behind

i use x= request("id")

not hetting teh value i get a eror msg erro obtaining the value

View 1 Replies View Related

How Do I Run An External Program In IE?

Apr 15, 2004

Is it possible to run an external program with a simple click in IE?
Actually i need to launch an editor with parameter, like

uedit32.exe "C:var est_devXML_HTMLSax-2.1.2XML_HTMLSax.php"

I guess some active-x stuff is required....

P.S. *.bat trick won't do as the file parameter is dynamic

View 5 Replies View Related

Writing Tic-Tac-Toe Program?

Jan 7, 2010

I'm trying to write a Tic-Tac-Toe program in JavaScript. I have an array containing the state of the grid. For some reason when I update the "O" for the computer's move, it doesn't show this in the updated grid. I don't understand why.[URL].. I'm brand new to JavaScript, and sometimes I accidentally use syntax from C++ or PHP when writing, so it could be something as simple as that. I just can't figure it out.

[Code]...

View 3 Replies View Related







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