Making Nouns Plural - Based On The Ending

Dec 13, 2009

I have an assignment for a class that I am not sure how to approach. A string, a noun, is input and the program is supposed to make it plural based on the ending. If it ends in a double consonant then I add one ending, if it ends in a vowel I add a different one and then if it ends in two vowels or two consonants I add a third, different ending. I am supposed to do this using string methods. For the project the vowels are A, C, L, and S. I have to read the data in using the string tokenizer. I am not sure how to approach making the loops I need to use to make the words plural.

View 7 Replies


Make Plural Word Singluar - Only For Words That End With An S

Nov 20, 2010

I want to be able to check a word to see if it is plural (if a word ends with the letter s). If it does I want to remove the letter. This does not have to be a perfect system. I understand that it will also remove the letter from potentially non-plural words if they end in s. It also does not need to handle plural words of other formats. I know this requires a regexp but I'm not sure where to begin.

View 4 Replies View Related

Making Decision (if) Based On A Random Number

Nov 18, 2010

I have a HTML file where I want to use javascript to generate a random float number between 0. and 1. and if the number is > or = 0.7 I want the background color of the HTML file change from beige to green. Is this stuff easy to achieve in javascript? Im a total javascript

View 5 Replies View Related

Does If, Else If Require An Ending Else?

May 13, 2006

For a long time I have been using:

else if
else if
else if

For example, I'm using it now to put different ads on different forum pages after checking the forum number in the URL. If there's no match, I don't want an ad on the page.

Is my code above "legal" or does it require an else at the end?

BTW, the reason I do it that way instead of just using ifs is that I figured that once it found a true condition it wouldn't bother reading the following else ifs and that would save time... it would run faster.

View 6 Replies View Related

Session Cookie Not Ending In IE

Jun 28, 2006

Cookie name is "viewStatus" value saved is 1

Closing all windows should end the session but on the reopening cookie page I find the session cookie is still alive.

If I alert(document.cookie) I get viewStatus = 1

If I rename the cookie to say "vStatus" and close the window when I reopen it and alert(document.cookie) I get

viewstatus=1 vStatus=1

any ideas?

This only happens in IE ( as always)


I just did a little experiment, I closed all windows, created a new file with just


in it then opened the file and still got

viewstatus=1 vStatus=1

I know I did not have this problem before because I have a session cookie example on my site and that does not work now so is it something new that is wrong with IE.

View 2 Replies View Related

JQuery :: For Loop Ending Early?

Nov 9, 2010

I'm using some jQuery to create a playlist for jPlayer. I have all of my songs indexed in a playlist that I have created like this:

var playlist1[
{ name: "song1", mp3: "/media/songs/song1.mp3" },
{ name: "song2", mp3: "/media/songs/song2.mp3"},


View 2 Replies View Related

JQuery :: Find Ids Within A Table Ending With A Specific Text?

Jul 12, 2011

I need to find all rows in a table ending with an id.. $("element[id$='txtTitle']")

this will work fine i know.... but i want to find it inside it inside another table whose id i have and not the whole document.. how do i achieve this??

View 5 Replies View Related

JQuery :: (.) Period In Value Field - Show/hide A Div Based Based On The Selection Made Via A Dropdown

Apr 9, 2010

Im using a jQuery script to show/hide a div based based on the selection made via a dropdown.

<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

The problem im having is that the value used in the dropdown lists are price values eg 10.00

Consequently jQuery seems to interprit these as css notations, meaning the code doesnt work.

View 4 Replies View Related

Jquery :: Id-based Vs Class-based Selectors And Hidden Elements

Oct 20, 2011

Given the following input tag which is enclosed within a hidden div tag:<input id="X" class="Y"/> this call (id-based) locates the tag: $(this).find("#X")but this one doesn't (class-based)I couldn't find any documentation indicating find() working differently when using id-based vs class-based selectors.

View 1 Replies View Related

Making A Pdf Out Of Javascript

Oct 23, 2007

is it possible to create a pdf file using javascript language?

View 1 Replies View Related

Making A Menu

Jul 20, 2005

I want to try and make a menu using javascript and DHTML. I want the
menu to be horizontaly placed on top of the webpage. When I move the
cursor over it a popup menu comes up. Sort of like what you can find
on the first page of near the top. But I want the menu to
have a more transparent blue color. Is that possible? Also where would
I go to find out how to do this?

View 1 Replies View Related

Making Images Pop Up?

Aug 23, 2011

I have a client who wants a gallery of images to pop up on her enter page similar to this site, . It won't be identical, but she likes the way the images all pop up and then just stay there.I know how to function JavaScript, but I don't know how to write it from scratch. Is there any where I could find a code that does something similar to this?

View 11 Replies View Related

Making Multiple Pop-ups?

Jan 8, 2006

I know how to make it so you click on a picture and a pop-up window appears with a picture inside. But i dont know how to put multiple pictures that are pop-ups...

View 1 Replies View Related

Form Making

Feb 8, 2006

how to make a form to show up on a html page from the site today but I'm still really confused by something

1. I was making a form to have ppl enter their info then it will e-mail the info to me, but I don't know what to do to make the data send to an e-mail address.

2 I don't know how to write the script so it will tell ppl "your form have been sent" if all the info did sent to my e-mail.

View 3 Replies View Related

Making A Function Run Only Once?

Apr 6, 2010

i am working on a page which direct users who come on website to index.php which i created in a new pop up window. i was checking that if someone (stupidly) refresh the url of my web from where he is redirected to the index.php ,it re run the funtion and another pop up is created. is there anyway i can add validation kind of thing that if pop up is created it alert the user that web page already opened. can i able to do that?

View 2 Replies View Related

Making Cookies

Jun 10, 2005

There are a lot of extremely smart members here, so I thought if the knowledge is out there, this would be the place to tap into it. I have included the code below that I am working with. What I want is for a person to enter their name and room number and coffee preference. Then a cookie will store that information and tell them a cup will be sent to them at their room. When the page is loaded again their preference will be remembered and they will be offered a discount for their favorite coffee. This is part of a self taught book I am studying.

Most of it works, but I think the selection of coffee from the radio button is not being stored in the cookie, or at least I can not recall it. I was also wondering if there was some way that I could combine the makeCookie and welcome functions so that there would only be one button to click on the page. Code:

View 2 Replies View Related

Making URL Not Editable

Jan 12, 2010

I am not sure this belongs in the JavaScript section so apologies if it doesn't.
I want to be able to open a link in a new window, but make sure the users are not able to modify the URL.
Is that possible?

View 4 Replies View Related

Making A List Read-only

Jul 23, 2005

I'm having difficulty making a list (both drop down and radio button) read
only; I am successful when I attempt to make a text field read only. Any
suggestions on what java script I use to accomplish this?

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:

<li>item 1

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 =

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

Making A Back Button

Jul 20, 2005

I have a graphic with a rollover for site navigation on each page. I
put the page to go back to in the rollover javascript.

My question is, is it possible to put in some code that will refer the
visitor back to whatever page they came from rather than one I

The rollover is combined with a tooltip script to make matters fun
(below). However, I'm quite happy to lose the tooltip to have the link
perform as a back button.

<a href="../index.asp"
showtip(this,event,'Back to home page');"
onmouseout="document.images['link1'].src=img1.src; hidetip()";><img
src="bhome.gif" name="link1" border=0></a>

View 3 Replies View Related

JQuery :: Making A Div Get And Set Its Own Width?

Jan 28, 2010

I don't know if this will work, but I'm trying to put a google map on my website and in IE, the div containing the map needs to have a width value in pixels in order for the API to center the map properly. want a div with 100% width, which is inside another expanding column. This works everywhere but IE. My question is, Is there a way, using jQuery, to get the div to discover its inherent width and then apply that in pixels, as an inline style, to that tag? It would also have to redefine its width when the window resizes.

View 2 Replies View Related

JQuery :: Making A Pop Up Box On A Calendar?

May 8, 2010

I am trying to build a calendar that has clickable dates that reveal a pop up box with the event of the day when you click on them.I have got some basic functionality at the moment with the pop up working on one date,making it work on multiple the moment I have the pop up box positioned relative and and am using the toggle function to switch the display form none to block.I need to work out how to position the pop up box no matter which date you click on?here is the mark up for part of the table:



View 1 Replies View Related

Making Dialog Box To Open Another One?

Feb 17, 2010

I am trying to get a dialog box to open another dialog box. Clicking on "more search options" the first time results in opening a dialog box. Clicking "search" within the dialog box results in opening up a second dialog box. But this only works the first time I click on "more search options". In other words, the second dialog box only opens up only once. To get the second dialog to open again, I have to reload the page in the browser. CSS and jquery code can be downloaded from [URL].

View 1 Replies View Related

Making Image Clickable Only Once

Apr 11, 2010

I have an image on which when user click I submit my form after doing basic javascript validation.I want user not to be able to click once they clicked on the image so that they don't submit it twice. Right now I disable the image once they click it.I was wondering is there any other way I can do that, is there any way to make image click able only once?

View 5 Replies View Related

Making An Array Lowercase

Nov 6, 2009

Is it possible to make an array lowercase at all? or can you only do this with a string?

View 5 Replies View Related

Making My Script Smoother?

Jun 11, 2010

I recently made my first ever ajax chat, and works given im a noob im quite happy about it :P How ever, sadly - its not smooth like some ajax chat's i've seen out there. And when i submit a message to teh chat the page refreshes.I was wondering if some one could help me by explaining how i can improve the efficientcy of it so it won't refresh and reacts alot quicker to create a live effect - This is what i got for my code:

<script type="text/JavaScript">
function sendMessage()

The PHP is chat.php loads the chat (a MYSQL query getting latest 20 chat messages and loops them out into the div)chatpost inserts the message to the table.

View 10 Replies View Related

Copyrights 2005-15, All rights reserved