Required With A Line Of Code?
Jun 26, 2011
Could somebody please take a look at the lines of coding below and advise on how to complete it? It's a code to translate a piece of text, I kinda figured some of it out, The first part is to translate 'the cat sat on the mat' to 'thube cubat subat ubon thube mubat'. The second part is entering text and clicking a button to translate.
First part - translating cat on the mat:
function isVowel(aCharacter)
{
return ((aCharacter == 'a') || (aCharacter == 'A')||
(aCharacter == 'e') || (aCharacter == 'E')||
(aCharacter == 'i') || (aCharacter == 'I')||
[Code]...
View 14 Replies
ADVERTISEMENT
Feb 7, 2010
My code:
function run() {
for(var k = 0; k < newPhotos.length; k++)
{[code]....
I get an error on this line Quotedocument.getElementById(imageId).style.backgroundImage = "url(" + newPhotos[k] + ")";
the error is: QuoteObject Required
I'm just not sure what object they are talking about. This piece of code basically goes through and assigns x amount of divs a background image.
View 2 Replies
View Related
Jul 5, 2009
I am working on outlet pages of an online store.There are 4 products displayed on each row.On that store, products are displayed with images,product name, model no., price and buttons.For some products, the name is longer, for some price is longer.I am using <td> for displaying each information.The problem is - the height of the name's <td> and price's <td> are different for different products.I want a JS code which can detect the biggest height (for each row separately) from both the above td's separately and assign the maximum height to the corresponding 3 td's of that row.This should be done for each row separately.note : I an right now using this code - But it takes the height of both td's for 1st product only and assign it to all the products.
<script type="text/javascript" language="javascript">
var ht1 = document.getElementById("name_td1").offsetHeight;
document.getElementById("name_td1").style.height = ht1;
[code].....
View 1 Replies
View Related
Mar 17, 2011
I have a huge HTML page to be tranlasted with links every times in the right side of the page, and the content and but seems like a problem with javascript
it contains Javascript +PHP code, runs perfectly with Mozilla but say object requires in Internet explorer. the code is following
[ICODE]
PHP Code:
<script src="https://www.google.com/jsapi?key=google translate code" type="text/javascript"></script>
[Code]....
View 2 Replies
View Related
Mar 23, 2011
i have a problem with a third-party code written using JQuery and i would like to debug it.however, as it is in 1 line (in my classical editor) i would like to know if it exists an editor which explode this 1 line code in a normal Javascript code ...more human readable.
View 2 Replies
View Related
Oct 22, 2002
Is it possible to create a pop-up window without putting code in the <HEAD> of the document? I'd like to create a link to a new window but I don't have access to the <HEAD> of the page.
View 2 Replies
View Related
Aug 12, 2011
How can I change the line "Re-record this video" to a button. And How can I change it's location on the page?
Code:
document.write("<p><a href='index.html?filename="+my_filename+"'>Re-record this video</a><br/><br/>");
View 4 Replies
View Related
Nov 12, 2006
How to code this line of javascript for Firefox.. Code:
if (document.all) fader.innerHTML = text_out; // document.all = IE only
View 5 Replies
View Related
Feb 22, 2011
I have a variable that says:
Code:
var Fname = lalala.js;
How do I write a function that moves the variable into a line of code like this?
Code:
<script type="text/javascript" src="lalala.js"></script>
The problem I having is the quotation marks as far as I know.
[URL]
View 3 Replies
View Related
Jul 20, 2010
When I want to handle html/css code in js/jquery it seems that line breaks aren't allowed. This of course makes the code less readable. Is there a workaround to this or is it simply to accept?This doesn't work:
$("head").append("<style type='text/css'>
#table {table-layout: fixed;width:650px;text-align: left;border-collapse: collapse;}
</style>");
This works:
$("head").append("<style type='text/css'>#table {table-layout: fixed;width:650px;text-align: left;border-collapse: collapse;}</style>");
View 3 Replies
View Related
Aug 29, 2009
This may seem like a silly question...
What are the rules for putting a semicolon at the end of a line of code?
View 6 Replies
View Related
Aug 19, 2009
I'm trying to convert a line using a regular expression. The re I am using is this:
<div><span>·<span>[s*]</span></span>([^<]*)</div>
I'm using the expression in the replace function like this:
html = html.replace( /<div><span>·<span>[s*]</span></span>([^<]*)</div>/gi,'<li>$1</li>') ;
The line of code I am changing is like this:
<div><span>·<span> </span></span>Illness - where a pupil is too ill to leave the house</div>
E.g. it should strip out the code and leave <li>Illness - where a pupil is too ill to leave the house</li>. It works fine here [URL] but when used with the replace command it does not? (I'm trying to convert bullet points from word).
View 2 Replies
View Related
Jan 25, 2010
I'm using jQuery+drupal and some jQuery plugins. All is ok with Firefox. But in IE's i'm receiving problem like this.
Line: 1
Char: 1
Error: object expected
URL: /
I have included .js files. How to know where is the problem? In which file? Line 1? Which file? If you need source code say me I'll PM you address.
View 7 Replies
View Related
Oct 10, 2011
I have the following line of code in a page and I need to 'hide' the entire row [code]...
Is there a way to do that?
View 1 Replies
View Related
Apr 2, 2011
1. When I have the "<textarea>" code lines in it put a text-area on the page, but it puts all of the code following that first text-area line into the text-area box and doesn't execute that segment of code.
2. When there is no "<textarea>" (for the sake of seeing if the rest of it worked) it doesn't check the survey.
I'm stumped and can't figure out what to do at this point Code and pictures follow:
[Code]....
View 9 Replies
View Related
Jun 30, 2009
What I am trying to accomplish is I have a radio button "RequiredApprovalYesNo". When the selection is "Yes", I need fields "Approver" and "ApproverEmail" to be required upon submit. I also need to make sure that a selection is made with this radio button of either Yes or No.Here is my HTML code for these three fields and was wondering if someone could show me how to code this script or, give me an example of a Radio button selection resulting in additional fields being required or not.
<td>
<input type="radio" name="RequireApprovalYesNo" id="RequireApprovalYesNo" value="Yes">Yes
<input type="radio" name="RequireApprovalYesNo" id="RequireApprovalYesNo" value="No">No[code]......
View 25 Replies
View Related
Jul 6, 2011
I have a problem with quotes.
$(document).ready(function(){
$('#txtValue').keyup(function(){
sendValue($(this).val()); [code]....
if $T contains just "text", the code works perfectly.
if $T contains line break, quotes " or ', the code doesn't work.
View 3 Replies
View Related
Jun 6, 2009
i want to ask that is it possible that using javascript injection the contents of a web page can be altered (add / edit / deleted) in Line of Code.Since, this has happened with me couple of times,talking to the support team at my hosting provider, they say that its due to the security holes in the Coding, but i think that its the security issue at the hosting side (since modifying the web pages code)i've found this code immediately after the opening of the body tagearlier the page snoofing for the above URL was working, but now its not producing the output. (so can not post whats inside it).My Another website (hosted by the same provider) is also infected. there the code immediately after the body tag is again the page snoofing yeilds no output with the error
View 6 Replies
View Related
Mar 20, 2010
As usual, this site works with every single browser known to man ...........except for any version of IE. I have tried using IE's devel tools to no avail ....though I'm a complete newb, so that isn't saying much. Code?Here's the section IE complains about:
function display(str)
{
var nodeList = xmlDoc.getElementsByTagName("item");[code]....
**** UPDATE *****Well ...it looks like I can't have null values in any elements ( in the xml document ). How do you experts satisfy this requirement in an elegant fashion.Since there is no data for certain elements, I'm looking for a reasonable failover solution. Empty quotes?..... still experimenting. A script produces the xml file from a database so some elements do not have data for certain
child elements.
View 2 Replies
View Related
Nov 30, 2010
I have created a basic Javascript function to check that all fields in the contact form that are required have information from the user. It works fine with input fields but not with textarea. Even when I dont insert message into textarea, the script allows to submit the form. I have given the name for textarea "userinput". Could anyone look at the code, and tell me what could possible be wrong with it?
function required()
{
user_message=document.contact_form.userinput.value;[code]......
View 6 Replies
View Related
May 25, 2010
how to read a text file using javascript line by line and separate from special characters in it. for example
Text.txt has
001203=Line one=abc.html
024353=Line two=xyz.html
092434=Line three=hjf.html
i want each column in an array like { 001203,024353,092434 } so total 3 arrays.
View 14 Replies
View Related
Feb 22, 2010
getting first line coordinates of multiple line inline element.
Example HTML
aaa bbb ccc ddd <span id="target">eee fff ggg
hhh iii jjj</span>kkk lll mmm nnn ooo ppp qqq
$(document).ready(function() {
[Code]....
Assume that span#target has a line break, when I see a browser. Then I click span#target, above function returns the head of coordinates which second line ("hhh") has. I want to have the coordinates which first line ("eee") has. How can I get that?
View 1 Replies
View Related
Jan 11, 2012
reading file in jQuery. Please if anyone knows how to write tome or to the website.
$.get("data/zelis.si.txt",function(data){
$.each(lines, function(n,line){
$.ajax({
[code]....
View 7 Replies
View Related
Jul 7, 2010
How do I read a local text file line by line, one line at a time. I got upto opening a file, and can read whole file at a time. But I want to read just one line at a time. May be have a counter of lenght of the file and read only the counter number line at a time.
<SCRIPT language=JavaScript>
var fso = new ActiveXObject( 'Scripting.FileSystemObject' );
f = fso.OpenTextFile( "c:\mytextfile.txt", 1 );
[Code].....
View 2 Replies
View Related
Jan 13, 2011
I have a user that insists they have web applications that do this, and wants the one I'm building to do it too...
You have a table on an html form. As the user changes one or more fields in a table row and moves to the next line, the changed row should AUTOMATICALLY be sent back to the server and updated in the database.
If the user moves BACK to a line that's already been changed, and changed a field, a popup should display and ask "if the user really wants to change the field". If so, again, it should AUTOMATICALLY be sent to the server and updated in the database...
Ignoring the horridness of making that many round trips to the server and banging the database for every line, is there a way to AUTOMATICALLY do the equivalent of a submit and post the changed table row back to the php script?
View 3 Replies
View Related
Nov 26, 2007
How would one go about requiring a login to vote in a poll, or give something a rating? Is it in the actual login script or would it be something I have to add to the polls/rating systems coding.
View 2 Replies
View Related