Click here to Skip to main content
       

JavaScript

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
Questionnodejs article moderation state unclear PinmemberHarish Palaniappan3 Mar '12 - 17:43 
Hi there.. I wrote a nodejs article and posted for moderation.
It is neither showing any change in its moderation status from pending.. nor is it showing up on the 'articles pending review' section.
Did I have to do something which I missed because of which it is pending.. or am I missing to understand any reviewer comment ?
 
<a href="http://www.codeproject.com/Articles/339740/Know-Javascript-use-node-js-server-side">Know Javascript..use node.js server-side</a>
 
-Harish
AnswerRe: nodejs article moderation state unclear PinmvpRichard MacCutchan3 Mar '12 - 23:26 
AnswerRe: nodejs article moderation state unclear PinmemberBobJanova5 Mar '12 - 0:43 
QuestionAccessing another windows variables PinmemberMember 43038102 Mar '12 - 3:16 
I have define a variable in window A.
 
I set it to parent.variable=xxxx
 
Now I open a new tab (window B).
 
Can I access or take the parent.variable from window A in window B ?
AnswerRe: Accessing another windows variables PinmemberBobJanova2 Mar '12 - 4:14 
AnswerRe: Accessing another windows variables Pinmemberall_in_flames23 Apr '12 - 4:12 
Questionpassing parameter from one page to another Pinmemberjack4277928 Feb '12 - 11:12 
You might want to use a 'hidden' input on your form. When the page opens in the iframe you can grab the value from the Request object and use it in your iframe. I see the requirement not to use cookies.
Jack
AnswerRe: passing parameter from one page to another Pinmembermark merrens28 Feb '12 - 11:33 
QuestionJQuery Animate PinmemberSRJ9226 Feb '12 - 16:22 
Hey,
Any ideas why this won't work? i want the text and image to go back to the original position then repeat the previous animation, so the text goes out to the right then resets, and comes back in from the left, and the same for the image ..
 
<
<html>
<head>
<script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script>
<script type="text/javascript"> 
$(document).ready(function(){
		bringIn(); 	
 function bringIn()
	{
	$("#animation_image").animate({top:10},"slow");
	$("#animation_text").animate({left:30},2000);
	window.setTimeout(takeOut, 5000);
	};
 function takeOut()
	{
	$("#animation_image").animate({top:401},"slow").queue(function(){
		$("#animation_text").animate({left:1000},"slow",bringIn);
		//new
		$("#animation_text").css({"left":"-600px"});
		$("#animation_image").css({"top":"-200px"});
		$("#animation_text").html("Why you no working");
	});
	};
});
 
</script> 
</head>
 
<body>
<button>Start Animation</button>
<br /><br />
<style type="text/css">
#animation_box
	{
	position:relative;
	width:800px;
	height:300px;
	margin:0px auto 0px auto;
	background-color:#333333;
	overflow:hidden;
	}
#animation_text
	{
	position:absolute;
	display:block;
	z-index:2;
	left:-600px;
	top:20px;
	width:300px;	
	font-family:Arial, Helvetica, sans-serif;
	font-size:30px;
	line-height:45px;
	color:white;
	}
#animation_image
	{
	position:relative;
	display:block;
	float:right;
	top:-200px;
	margin-right:10px;
	}
</style>
<body>
 
<div id="animation_box">
						<div id="animation_text">
							<ul>
								First 3 hours &pound;36
							</ul>
						</div>
						<div id="animation_image">
 
									<img src="img/slides/img8.jpg" id="animation_img" width="420px" height="280px" alt="Car image"/>
 
						</div>
					</div>
</body>
</html>
 

 
Thanks for all your help
Questionpassing parameter from one page to another Pinmembervaibhavtiwari26025 Feb '12 - 21:00 
how can i pass parameter from 1 page to another using javascript i cannot use query string and cookies.
 
{ my task is i have a page page1 in which there are two links on clicking that link it open in iframe of new page page2 }
 
any suggestion would be great help for me
 
Thanks in advance.
AnswerRe: passing parameter from one page to another Pinmemberhansoctantan28 Feb '12 - 2:04 
AnswerRe: passing parameter from one page to another Pinmemberchandubond12 Mar '12 - 6:17 
QuestionTrying to use age.ClientScript.RegisterHiddenField - need help [modified] PinmemberMember 779716724 Feb '12 - 13:49 
Hi,
 
I have a myPage.aspx page and 2 user controls, ucA and ucB. ucA (parent control) is being used in ucB (child control inherits ucA). Finallly ucB is registered in myPage.aspx. I have two dropdowns in ucB.
 
Now, I am trying to put the selected values of these dropwdowns in a hidden variables using the below code and I am putting this in myPage.aspx page_load code
 

Page.ClientScript.RegisterHiddenField("LabValue", labname selectedvalue using FindControl)
 
Page.ClientScript.RegisterHiddenField("ClientValue", ClientName SelectdValue using FindControl))
 
The above code runs fine and no errors.
 
Now in the exeternal .js file I am accessing this values as
 
var lv = document.getElementById("LabValue").value;
var cv = document.getElementById("ClientValue").value;
 
All look fine. But the issue is no matter what values I put in the LabValue and ClientValue hidden fields I always get the values as 0 for lv and cv (java script variables).
 
Say for instance if LabValue is 10002 when I try to access it via javasacript using document.getElementById("LabValue").value; I always get 0 instead of 10002. It is the same case with the other hidden field too.
 
When I looked at the myPage.aspx viewsource I always see
 
<input type="hidden" name="LabValue" id="LabValue" value="0" />
 

Am I missing some thing here?
 
Thanks in advance,
 
L

modified 24 Feb '12 - 20:04.

QuestionHow to Create Ruler JavaScript Pinmembereg_Anubhava21 Feb '12 - 6:59 
Hi Everybody,
 
I am new in Web Site Development. I want to Create Horizontal and Vertical Ruler same As http://demo.aurigma.com/BusinessCardEditor/default.aspx#[^]
 

I want help from your site.
 

Thanks
If you can think then I Can.

AnswerRe: How to Create Ruler JavaScript PinprotectorAspDotNetDev21 Feb '12 - 7:07 
GeneralRe: How to Create Ruler JavaScript Pinmembereg_Anubhava21 Feb '12 - 17:19 
GeneralRe: How to Create Ruler JavaScript Pinmemberjohny1015198122 Feb '12 - 14:34 
AnswerRe: How to Create Ruler JavaScript Pingroupstuartthomas0125 Mar '12 - 21:13 
Questioncall web service from java script Pinmembergiocot17 Feb '12 - 6:35 
i'm trying to call a web service from java script code stored NOT in Html but in an extenarl file .js. My code is this:
 
service.useService("http://localhost:10000/WebS_cod_01/WebS_codEurService.asmx?wsdl", "WebS");
 
Photo = service.WebS.callService("webS_codEurProcessWS" , photoID);
 
checking with Firebug i find this message:
 
"service is not defined"
 
where i'm wrong ?
 
thanks in advance
AnswerRe: call web service from java script [modified] PinmemberJoachim123421 Feb '12 - 10:59 
Questioni am using console.log() in my code. [modified] PinmemberDeepthiTanguturi15 Feb '12 - 18:27 
i am using console.log() in my code.where the output will be printed.

modified 16 Feb '12 - 0:42.

AnswerRe: i am using console.log() in my code. Pinmvpthatraja15 Feb '12 - 19:29 
AnswerRe: i am using console.log() in my code. PinmentorDaveAuld19 Feb '12 - 0:59 
Questionattr disabled property is not working for FF Pinmemberdayakar_dn12 Feb '12 - 19:35 
Hi,
 
i like to disable the buttons on check of the checkbox....using Jquery
 
i have tried in 3 different ways...
 
1.attr("disabled", true)-- working in IE not in FF
2.attr("disabled", "disabled")- working in IE not in FF
3.attr("diabled") not working in both...
 
i want to know the property which is supported by all the browsers(like safari, chrome etc..)
 

thanks in advance
AnswerRe: attr disabled property is not working for FF PinmemberGraham Breach12 Feb '12 - 22:46 
AnswerRe: attr disabled property is not working for FF Pinmemberjohny1015198114 Feb '12 - 5:53 
GeneralRe: attr disabled property is not working for FF PinmemberramuAlla1 Mar '12 - 1:15 
AnswerRe: attr disabled property is not working for FF PinmemberEdward Nutting19 Feb '12 - 0:34 
QuestionHow can i use backbone.js PinmemberDeepthiTanguturi10 Feb '12 - 22:02 
How can i use backbone.js.What is the purpose of backbone.js.Post some sample code.Actually i tried on google.I am not getting correct solution.
AnswerRe: How can i use backbone.js PinmvpRichard MacCutchan10 Feb '12 - 23:50 
Questionpage loading [modified] PinmemberMember 79044828 Feb '12 - 20:22 
hi
how I can create menu like this (when click on it, opens and show its description:
http://www.codeproject.com/Forums/1580226/JavaScript.aspx
 
but I want when I click on menu it loads an image under itself
please help me
thanks alot

modified 9 Feb '12 - 5:23.

QuestionNeed Help Setting <img> src attribute PinmemberPianoMan7 Feb '12 - 5:26 
I've hit a wall trying to use javascript to write a table with some image tags. I'm looping through an array of image names, then setting their src attribute. The function is creating the <img> tags, but all that displays is the 'missing image' thumbnail. The function is fired via a button. Below is my code.
 
Thanks!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex">
 
<title>Testing Javascript</title>
 
<script type="text/javascript">
 
function getImages() {
 
// Declare variables
var allImages, vRow, vCell, vText, vImg;
var vCnt, i, j, x, y;
var vTable = document.createElement("TABLE");
var vTBody = document.createElement("TBODY");
 
// Insert vBody into vTable
vTable.appendChild(vTBody);
 
// create an array
var images = new Array();
 
images[0] = "image1.jpg";
images[1] = "image2.jpg";
images[2] = "image3.jpg";
 
// count values in the array
vCnt = images.length;
 
  // loop through the array of images and answers
  for (i=0; i < vCnt; i++)
  {
	// create a row
	vRow = document.createElement("TR");
 
	// create a TD tag
	vCell = document.createElement("TD");
 
	// create IMG element
	var image = images[i];
	vImg = document.createElement("IMG");
	vImg.setAttribute("src", "images/" + image);
 
	// insert the img tag into the td tag
	vCell.appendChild(vImg);
 
	// insert the cell into the row
	vRow.appendChild(vCell);
 
	// insert the row into the table
	vTBody.appendChild(vRow);
  }
 
// add the table to the doc
var vTableContainer = document.getElementById("vTableContainer");
vTableContainer.appendChild(vTable);
}
// end updatePage()
</script>
</head>
 
<body bgcolor = "#FFFFFF">
<h2>Javascript and Images</h2>
 
<div id="parentDiv">
 
<p>
Trying to set the image source with js...
</p>
 
<div id="childDiv">
 
<form method="GET">
<input type="button" value="DISPLAY IMAGES" onClick="getImages();" />
</form>
 
</div>
 
<div id="vTableContainer"></div>
 
</div>
</body>
</html>

AnswerRe: Need Help Setting src attribute PinmemberDean Oliver7 Feb '12 - 6:40 
GeneralRe: Need Help Setting src attribute PinmemberPianoMan7 Feb '12 - 16:24 
GeneralRe: Need Help Setting src attribute PinmemberDean Oliver7 Feb '12 - 21:56 
AnswerRe: Need Help Setting src attribute Pinmemberjohny101519817 Feb '12 - 18:12 
AnswerRe: Need Help Setting src attribute Pinmembertwseitex19 Feb '12 - 2:50 
QuestionImages Won't display in IE 7 PinmemberPianoMan5 Feb '12 - 6:27 
Would someone please tell me why this js won't display images in IE 7, but works perfectly in Firefox? I'm using Windows XP, and I've double-checked all my settings in IE 7. Thanks!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Sample</TITLE>
 
<SCRIPT LANGUAGE="JavaScript">
window.onload = fnWrite;
 
function fnWrite()
{
  // Declare variables
  var vTable = document.createElement("TABLE");
  var vTBody = document.createElement("TBODY");
  var vRow, vCell, vDiv, vImg;
  var i;
 
  var images = new Array();
  images[0] = "images/treble_f1.JPG";
  images[1] = "images/treble_c1.JPG";
  images[2] = "images/treble_d1.JPG";
  images[3] = "images/treble_e1.JPG";
 
  // Insert vBody into vTable
  vTable.appendChild(vTBody);
 
  // Insert a row
  vRow = document.createElement("TR");
  vTBody.appendChild(vRow);
  vCell = document.createElement("TD");
  vRow.appendChild(vCell);
 
  // Insert images
  for (i=0; i<images.length; i++)
  {
    vDiv = document.createElement("DIV");
    vCell.appendChild(vDiv);
 
    vImg = document.createElement("IMG");
    vImg.src = images[i];
    vImg.setAttribute("alt", "image");
    vCell.appendChild(vImg);
  }
  // Insert the table
  vTableContainer.appendChild(vTable);
}
</SCRIPT>
 
</HEAD>
<BODY>
<H1>Javascript Won't Work in IE 7</H1>
<div id="vTableContainer"></div>
 
</BODY>
</HTML>

AnswerRe: Images Won't display in IE 7 PinmvpRichard MacCutchan5 Feb '12 - 23:23 
GeneralRe: Images Won't display in IE 7 PinmemberPianoMan6 Feb '12 - 4:15 
GeneralRe: Images Won't display in IE 7 PinmvpRichard MacCutchan6 Feb '12 - 4:30 
GeneralRe: Images Won't display in IE 7 - SOLVED PinmemberPianoMan6 Feb '12 - 4:43 
GeneralRe: Images Won't display in IE 7 - SOLVED PinmvpRichard MacCutchan6 Feb '12 - 5:31 
AnswerRe: Images Won't display in IE 7 Pinmemberjsc4214 Feb '12 - 3:41 
AnswerRe: Images Won't display in IE 7 Pinmembertwseitex19 Feb '12 - 2:59 
QuestionProblem with args.isValid in JS [modified] Pinmemberdayakar_dn1 Feb '12 - 22:14 
Hi,
 
i am not able set the args.isValid as false for JS function...which is not having custom validator..
 
find the code below:
 
<asp:LinkButton runat="server"  ID="btnApply" TabIndex="1"  CssClass=" primary"  OnClientClick = "return ApplyClick(this);" >
 
JS Code:
 
function Applyclick(args) {
 

if (errMsg != null) {
                       args.IsValid = false;
 
                      }
 
return false;
}
 

thanks in advance

modified 2 Feb '12 - 5:03.

AnswerRe: Problem with args.isValid in JS Pinmemberjohny101519811 Feb '12 - 22:36 
GeneralRe: Problem with args.isValid in JS Pinmemberdayakar_dn1 Feb '12 - 23:03 
GeneralRe: Problem with args.isValid in JS Pinmemberjohny101519811 Feb '12 - 23:10 
Questionupdate several DIV using javascript with mysql data PinmemberSergio8430 Jan '12 - 10:09 
Hello everyone, I would like to know if you can help me out in a simply task yet I cant get my way around it.
Ive manage to update a single DIV but cant update a php file with several different DIV.
Data is comming from a mysql query using a separate php file.
 
This is what ive got, please can you help me write a simple code to recover more than one piece of data from a mysql query and update all the divs of an html,php file?
 
<pre lang="Javascript">
<<pre lang="xml">html> >

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid